Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-storage / default.nix
blob1c17e2a0867d93daa10cc3be9e44ff566a0bdfe8
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 , pythonRelaxDepsHook
15 , requests
16 , setuptools
19 buildPythonPackage rec {
20   pname = "google-cloud-storage";
21   version = "2.16.0";
22   pyproject = true;
24   disabled = pythonOlder "3.7";
26   src = fetchPypi {
27     inherit pname version;
28     hash = "sha256-3aSF+lA3EKgo0BJGvRbOnbCCPcUbvKdCzpamgX1YZp8=";
29   };
31   nativeBuildInputs = [
32     pythonRelaxDepsHook
33     setuptools
34   ];
36   pythonRelaxDeps = [
37     "google-auth"
38   ];
40   propagatedBuildInputs = [
41     google-auth
42     google-cloud-core
43     google-resumable-media
44     requests
45   ];
47   passthru.optional-dependencies = {
48     protobuf = [
49       protobuf
50     ];
51   };
53   nativeCheckInputs = [
54     google-cloud-iam
55     google-cloud-kms
56     google-cloud-testutils
57     mock
58     pytestCheckHook
59   ];
61   # Disable tests which require credentials and network access
62   disabledTests = [
63     "create"
64     "download"
65     "get"
66     "post"
67     "upload"
68     "test_build_api_url"
69     "test_ctor_mtls"
70     "test_hmac_key_crud"
71     "test_list_buckets"
72     "test_open"
73     "test_anonymous_client_access_to_public_bucket"
74     "test_ctor_w_custom_endpoint_use_auth"
75     "test_ctor_w_api_endpoint_override"
76   ];
78   disabledTestPaths = [
79     "tests/unit/test_bucket.py"
80     "tests/system/test_blob.py"
81     "tests/system/test_bucket.py"
82     "tests/system/test_fileio.py"
83     "tests/system/test_kms_integration.py"
84     "tests/unit/test_transfer_manager.py"
85   ];
87   preCheck = ''
88     # prevent google directory from shadowing google imports
89     rm -r google
91     # requires docker and network
92     rm tests/conformance/test_conformance.py
93   '';
95   pythonImportsCheck = [
96     "google.cloud.storage"
97   ];
99   meta = with lib; {
100     description = "Google Cloud Storage API client library";
101     homepage = "https://github.com/googleapis/python-storage";
102     changelog = "https://github.com/googleapis/python-storage/blob/v${version}/CHANGELOG.md";
103     license = licenses.asl20;
104     maintainers = with maintainers; [ ];
105   };