blob: 846b390b9c9d572b7a9d2b3035d91fa9be66fc36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
{ lib
, aiohttp
, buildPythonPackage
, fetchPypi
, google-auth
, google-cloud-testutils
, google-crc32c
, mock
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "google-resumable-media";
version = "2.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-lyhS9sZfkz4VpKIQwrlpMHY7Rxl830ql9b6kNe+2Juc=";
};
propagatedBuildInputs = [
google-auth
google-crc32c
];
passthru.optional-dependencies = {
requests = [
requests
];
aiohttp = [
aiohttp
];
};
nativeCheckInputs = [
google-cloud-testutils
mock
pytest-asyncio
pytestCheckHook
] ++ passthru.optional-dependencies.requests;
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";
changelog = "https://github.com/googleapis/google-resumable-media-python/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
|