2021-01-05 13:45:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
2021-01-06 09:46:48 +00:00
|
|
|
, google-auth
|
|
|
|
, google-cloud-iam
|
|
|
|
, google-cloud-core
|
|
|
|
, google-cloud-kms
|
|
|
|
, google-cloud-testutils
|
|
|
|
, google-resumable-media
|
2021-01-05 13:45:37 +00:00
|
|
|
, mock
|
|
|
|
}:
|
2018-11-02 18:47:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-storage";
|
2021-06-06 20:54:29 +01:00
|
|
|
version = "1.38.0";
|
2018-11-02 18:47:18 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 22:47:20 +01:00
|
|
|
sha256 = "162011d66f64b8dc5d7936609a5daf0066cc521231546aea02c126a5559446c4";
|
2018-11-02 18:47:18 +00:00
|
|
|
};
|
|
|
|
|
2019-10-10 09:58:58 +01:00
|
|
|
propagatedBuildInputs = [
|
2021-01-06 09:46:48 +00:00
|
|
|
google-auth
|
|
|
|
google-cloud-core
|
|
|
|
google-resumable-media
|
2019-10-10 09:58:58 +01:00
|
|
|
];
|
2021-01-05 13:45:37 +00:00
|
|
|
|
2020-07-07 20:10:35 +01:00
|
|
|
checkInputs = [
|
2021-01-06 09:46:48 +00:00
|
|
|
google-cloud-iam
|
|
|
|
google-cloud-kms
|
|
|
|
google-cloud-testutils
|
2020-07-07 20:10:35 +01:00
|
|
|
mock
|
2020-11-03 01:18:50 +00:00
|
|
|
pytestCheckHook
|
2020-07-07 20:10:35 +01:00
|
|
|
];
|
2018-11-02 18:47:18 +00:00
|
|
|
|
2021-01-05 13:45:37 +00:00
|
|
|
# disable tests which require credentials and network access
|
|
|
|
disabledTests = [
|
|
|
|
"create"
|
|
|
|
"download"
|
|
|
|
"get"
|
|
|
|
"post"
|
|
|
|
"test_build_api_url"
|
2021-04-05 04:00:39 +01:00
|
|
|
"test_ctor_mtls"
|
|
|
|
"test_open"
|
2021-01-05 13:45:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=tests/unit/test_bucket.py"
|
|
|
|
"--ignore=tests/system/test_system.py"
|
|
|
|
];
|
2020-11-03 01:18:50 +00:00
|
|
|
|
|
|
|
# prevent google directory from shadowing google imports
|
|
|
|
preCheck = ''
|
2020-03-18 21:53:09 +00:00
|
|
|
rm -r google
|
2018-11-02 18:47:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-05 13:45:37 +00:00
|
|
|
pythonImportsCheck = [ "google.cloud.storage" ];
|
|
|
|
|
2020-07-07 20:10:35 +01:00
|
|
|
meta = with lib; {
|
2018-11-02 18:47:18 +00:00
|
|
|
description = "Google Cloud Storage API client library";
|
2020-11-03 01:18:50 +00:00
|
|
|
homepage = "https://github.com/googleapis/python-storage";
|
2018-11-02 18:47:18 +00:00
|
|
|
license = licenses.asl20;
|
2021-01-05 13:45:37 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2018-11-02 18:47:18 +00:00
|
|
|
};
|
|
|
|
}
|