1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, google-auth
6, google-cloud-iam
7, google-cloud-core
8, google-cloud-kms
9, google-cloud-testutils
10, google-resumable-media
11, mock
12}:
13
14buildPythonPackage rec {
15 pname = "google-cloud-storage";
16 version = "1.37.0";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "sha256-IAPF7Uc/mzfQRfMMTIvn0w19Dripe80sWLOovFScTMw=";
21 };
22
23 propagatedBuildInputs = [
24 google-auth
25 google-cloud-core
26 google-resumable-media
27 ];
28
29 checkInputs = [
30 google-cloud-iam
31 google-cloud-kms
32 google-cloud-testutils
33 mock
34 pytestCheckHook
35 ];
36
37 # disable tests which require credentials and network access
38 disabledTests = [
39 "create"
40 "download"
41 "get"
42 "post"
43 "test_build_api_url"
44 "test_ctor_mtls"
45 "test_open"
46 ];
47
48 pytestFlagsArray = [
49 "--ignore=tests/unit/test_bucket.py"
50 "--ignore=tests/system/test_system.py"
51 ];
52
53 # prevent google directory from shadowing google imports
54 preCheck = ''
55 rm -r google
56 '';
57
58 pythonImportsCheck = [ "google.cloud.storage" ];
59
60 meta = with lib; {
61 description = "Google Cloud Storage API client library";
62 homepage = "https://github.com/googleapis/python-storage";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ SuperSandro2000 ];
65 };
66}