Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-storage / default.nix
blobebcb32bf2b455bb8717923122f13863777fae583
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , google-auth
5 , google-cloud-core
6 , google-cloud-iam
7 , google-cloud-kms
8 , google-cloud-testutils
9 , google-resumable-media
10 , mock
11 , protobuf
12 , pytestCheckHook
13 , pythonOlder
14 , requests
17 buildPythonPackage rec {
18   pname = "google-cloud-storage";
19   version = "2.10.0";
20   format = "setuptools";
22   disabled = pythonOlder "3.7";
24   src = fetchPypi {
25     inherit pname version;
26     hash = "sha256-k0sx6tXzmU5TYPn/V1CYLFtrEWBNwHK8RSwlll4Hbcc=";
27   };
29   propagatedBuildInputs = [
30     google-auth
31     google-cloud-core
32     google-resumable-media
33     requests
34   ];
36   passthru.optional-dependencies = {
37     protobuf = [
38       protobuf
39     ];
40   };
42   nativeCheckInputs = [
43     google-cloud-iam
44     google-cloud-kms
45     google-cloud-testutils
46     mock
47     pytestCheckHook
48   ];
50   # Disable tests which require credentials and network access
51   disabledTests = [
52     "create"
53     "download"
54     "get"
55     "post"
56     "upload"
57     "test_build_api_url"
58     "test_ctor_mtls"
59     "test_hmac_key_crud"
60     "test_list_buckets"
61     "test_open"
62     "test_anonymous_client_access_to_public_bucket"
63     "test_ctor_w_custom_endpoint_use_auth"
64   ];
66   disabledTestPaths = [
67     "tests/unit/test_bucket.py"
68     "tests/system/test_blob.py"
69     "tests/system/test_bucket.py"
70     "tests/system/test_fileio.py"
71     "tests/system/test_kms_integration.py"
72     "tests/unit/test_transfer_manager.py"
73   ];
75   preCheck = ''
76     # prevent google directory from shadowing google imports
77     rm -r google
79     # requires docker and network
80     rm tests/conformance/test_conformance.py
81   '';
83   pythonImportsCheck = [
84     "google.cloud.storage"
85   ];
87   meta = with lib; {
88     description = "Google Cloud Storage API client library";
89     homepage = "https://github.com/googleapis/python-storage";
90     changelog = "https://github.com/googleapis/python-storage/blob/v${version}/CHANGELOG.md";
91     license = licenses.asl20;
92     maintainers = with maintainers; [ ];
93   };