about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix b/nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix
new file mode 100644
index 000000000000..cf869d5c8eff
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestCheckHook
+, google-auth
+, google-cloud-iam
+, google-cloud-core
+, google-cloud-kms
+, google-cloud-testutils
+, google-resumable-media
+, mock
+}:
+
+buildPythonPackage rec {
+  pname = "google-cloud-storage";
+  version = "1.35.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "17kal75wmyjpva7g04cb9yg7qbyrgwfn575z4gqijd4gz2r0sp2m";
+  };
+
+  propagatedBuildInputs = [
+    google-auth
+    google-cloud-core
+    google-resumable-media
+  ];
+
+  checkInputs = [
+    google-cloud-iam
+    google-cloud-kms
+    google-cloud-testutils
+    mock
+    pytestCheckHook
+  ];
+
+  # disable tests which require credentials and network access
+  disabledTests = [
+    "create"
+    "download"
+    "get"
+    "post"
+    "test_build_api_url"
+  ];
+
+  pytestFlagsArray = [
+    "--ignore=tests/unit/test_bucket.py"
+    "--ignore=tests/system/test_system.py"
+  ];
+
+  # prevent google directory from shadowing google imports
+  preCheck = ''
+    rm -r google
+  '';
+
+  pythonImportsCheck = [ "google.cloud.storage" ];
+
+  meta = with lib; {
+    description = "Google Cloud Storage API client library";
+    homepage = "https://github.com/googleapis/python-storage";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}