2020-09-20 23:36:38 +01:00
|
|
|
{ lib
|
2018-11-02 17:58:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-01-06 09:46:48 +00:00
|
|
|
, google-auth
|
|
|
|
, google-cloud-testutils
|
|
|
|
, google-crc32c
|
2018-11-02 17:58:45 +00:00
|
|
|
, mock
|
2021-01-05 12:31:57 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
|
|
|
, requests
|
2018-11-02 17:58:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-resumable-media";
|
2021-01-05 12:31:57 +00:00
|
|
|
version = "1.2.0";
|
2018-11-02 17:58:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-05 12:31:57 +00:00
|
|
|
sha256 = "0hwxdgsqh6933kp4jkv6hwwdcqs7bgjn9j08ga399njv3s9b367f";
|
2018-11-02 17:58:45 +00:00
|
|
|
};
|
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
propagatedBuildInputs = [ google-auth google-crc32c requests ];
|
2018-11-02 17:58:45 +00:00
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
checkInputs = [ google-auth google-cloud-testutils mock pytestCheckHook pytest-asyncio ];
|
2021-01-05 12:31:57 +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
|
2018-11-02 17:58:45 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-05 12:31:57 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"google._async_resumable_media"
|
|
|
|
"google.resumable_media"
|
|
|
|
];
|
|
|
|
|
2020-09-20 23:36:38 +01:00
|
|
|
meta = with lib; {
|
2018-11-02 17:58:45 +00:00
|
|
|
description = "Utilities for Google Media Downloads and Resumable Uploads";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
|
2018-11-02 17:58:45 +00:00
|
|
|
license = licenses.asl20;
|
2021-01-05 12:31:57 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2018-11-02 17:58:45 +00:00
|
|
|
};
|
|
|
|
}
|