about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/google-resumable-media
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-26 18:06:19 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-26 18:21:18 +0000
commit7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch)
treeb68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/python-modules/google-resumable-media
parentc5c7451dbef37b51f52792d6395a670ef5183d27 (diff)
parent891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff)
downloadnixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/google-resumable-media')
-rw-r--r--nixpkgs/pkgs/development/python-modules/google-resumable-media/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/google-resumable-media/default.nix b/nixpkgs/pkgs/development/python-modules/google-resumable-media/default.nix
new file mode 100644
index 000000000000..531dc1a28603
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/google-resumable-media/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, google-auth
+, google-cloud-testutils
+, google-crc32c
+, mock
+, pytestCheckHook
+, pytest-asyncio
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "google-resumable-media";
+  version = "1.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0hwxdgsqh6933kp4jkv6hwwdcqs7bgjn9j08ga399njv3s9b367f";
+  };
+
+  propagatedBuildInputs = [ google-auth google-crc32c requests ];
+
+  checkInputs = [ google-auth google-cloud-testutils mock pytestCheckHook pytest-asyncio ];
+
+  preCheck = ''
+    # prevent shadowing imports
+    rm -r google
+    # fixture 'authorized_transport' not found
+    rm tests/system/requests/test_upload.py
+    # requires network
+    rm tests/system/requests/test_download.py
+  '';
+
+  pythonImportsCheck = [
+    "google._async_resumable_media"
+    "google.resumable_media"
+  ];
+
+  meta = with lib; {
+    description = "Utilities for Google Media Downloads and Resumable Uploads";
+    homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}