2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
google-auth,
|
|
|
|
google-cloud-testutils,
|
|
|
|
google-crc32c,
|
|
|
|
mock,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-resumable-media";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.7.0";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Xxj1+pg29LCDFiBkocLJjBcjm/2pylCtlwzPkF8+Yls=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-auth
|
|
|
|
google-crc32c
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
requests = [ requests ];
|
|
|
|
aiohttp = [ aiohttp ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
google-cloud-testutils
|
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.requests;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/googleapis/google-resumable-media-python/blob/v${version}/CHANGELOG.md";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|