biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / google-resumable-media / default.nix
blobbf55a48543a271ecfae49ede4bc05545214c1c4f
2   lib,
3   aiohttp,
4   buildPythonPackage,
5   fetchPypi,
6   google-auth,
7   google-cloud-testutils,
8   google-crc32c,
9   mock,
10   pytest-asyncio,
11   pytestCheckHook,
12   pythonOlder,
13   requests,
16 buildPythonPackage rec {
17   pname = "google-resumable-media";
18   version = "2.7.1";
19   format = "setuptools";
21   disabled = pythonOlder "3.7";
23   src = fetchPypi {
24     inherit pname version;
25     hash = "sha256-6uRRp7LizbqqD9LrAMyKHuXpXha1VZc1nLw9J9fZDjM=";
26   };
28   propagatedBuildInputs = [
29     google-auth
30     google-crc32c
31   ];
33   optional-dependencies = {
34     requests = [ requests ];
35     aiohttp = [ aiohttp ];
36   };
38   nativeCheckInputs = [
39     google-cloud-testutils
40     mock
41     pytest-asyncio
42     pytestCheckHook
43   ] ++ optional-dependencies.requests;
45   preCheck = ''
46     # prevent shadowing imports
47     rm -r google
48     # fixture 'authorized_transport' not found
49     rm tests/system/requests/test_upload.py
50     # requires network
51     rm tests/system/requests/test_download.py
52   '';
54   pythonImportsCheck = [
55     "google._async_resumable_media"
56     "google.resumable_media"
57   ];
59   meta = with lib; {
60     description = "Utilities for Google Media Downloads and Resumable Uploads";
61     homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
62     changelog = "https://github.com/googleapis/google-resumable-media-python/blob/v${version}/CHANGELOG.md";
63     license = licenses.asl20;
64     maintainers = [ ];
65   };