2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
2023-01-11 07:51:40 +00:00
|
|
|
, aiohttp
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, google-auth
|
|
|
|
, google-cloud-testutils
|
|
|
|
, google-crc32c
|
|
|
|
, mock
|
|
|
|
, pytest-asyncio
|
2023-01-11 07:51:40 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-01-09 10:05:03 +00:00
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-resumable-media";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "2.4.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;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-jVUYUC+SuezISsRneb1PCWlOyzujij58pzeobRXLyh8=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-auth
|
|
|
|
google-crc32c
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
requests = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
aiohttp = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
};
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
checkInputs = [
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|