2021-01-05 13:45:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, google_auth
|
|
|
|
, google_cloud_iam
|
|
|
|
, google_cloud_core
|
|
|
|
, google_cloud_kms
|
|
|
|
, google_cloud_testutils
|
|
|
|
, google_resumable_media
|
|
|
|
, mock
|
|
|
|
}:
|
2018-11-02 18:47:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-storage";
|
2021-01-05 13:45:37 +00:00
|
|
|
version = "1.35.0";
|
2018-11-02 18:47:18 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-05 13:45:37 +00:00
|
|
|
sha256 = "17kal75wmyjpva7g04cb9yg7qbyrgwfn575z4gqijd4gz2r0sp2m";
|
2018-11-02 18:47:18 +00:00
|
|
|
};
|
|
|
|
|
2019-10-10 09:58:58 +01:00
|
|
|
propagatedBuildInputs = [
|
2020-11-03 01:18:50 +00:00
|
|
|
google_auth
|
2019-10-10 09:58:58 +01:00
|
|
|
google_cloud_core
|
2020-07-07 20:10:35 +01:00
|
|
|
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-05 13:45:37 +00:00
|
|
|
google_cloud_iam
|
2020-11-03 01:18:50 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|