Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / google-resumable-media / default.nix
blob846b390b9c9d572b7a9d2b3035d91fa9be66fc36
1 { lib
2 , aiohttp
3 , buildPythonPackage
4 , fetchPypi
5 , google-auth
6 , google-cloud-testutils
7 , google-crc32c
8 , mock
9 , pytest-asyncio
10 , pytestCheckHook
11 , pythonOlder
12 , requests
15 buildPythonPackage rec {
16   pname = "google-resumable-media";
17   version = "2.6.0";
18   format = "setuptools";
20   disabled = pythonOlder "3.7";
22   src = fetchPypi {
23     inherit pname version;
24     hash = "sha256-lyhS9sZfkz4VpKIQwrlpMHY7Rxl830ql9b6kNe+2Juc=";
25   };
27   propagatedBuildInputs = [
28     google-auth
29     google-crc32c
30   ];
32   passthru.optional-dependencies = {
33     requests = [
34       requests
35     ];
36     aiohttp = [
37       aiohttp
38     ];
39   };
41   nativeCheckInputs = [
42     google-cloud-testutils
43     mock
44     pytest-asyncio
45     pytestCheckHook
46   ] ++ passthru.optional-dependencies.requests;
48   preCheck = ''
49     # prevent shadowing imports
50     rm -r google
51     # fixture 'authorized_transport' not found
52     rm tests/system/requests/test_upload.py
53     # requires network
54     rm tests/system/requests/test_download.py
55   '';
57   pythonImportsCheck = [
58     "google._async_resumable_media"
59     "google.resumable_media"
60   ];
62   meta = with lib; {
63     description = "Utilities for Google Media Downloads and Resumable Uploads";
64     homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
65     changelog = "https://github.com/googleapis/google-resumable-media-python/blob/v${version}/CHANGELOG.md";
66     license = licenses.asl20;
67     maintainers = with maintainers; [ ];
68   };