2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, google-auth
|
|
|
|
, google-cloud-iam
|
|
|
|
, google-cloud-core
|
|
|
|
, google-cloud-kms
|
|
|
|
, google-cloud-testutils
|
|
|
|
, google-resumable-media
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-storage";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "1.42.0";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "c1dd3d09198edcf24ec6803dd4545e867d82b998f06a68ead3b6857b1840bdae";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-auth
|
|
|
|
google-cloud-core
|
|
|
|
google-resumable-media
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
google-cloud-iam
|
|
|
|
google-cloud-kms
|
|
|
|
google-cloud-testutils
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable tests which require credentials and network access
|
|
|
|
disabledTests = [
|
|
|
|
"create"
|
|
|
|
"download"
|
|
|
|
"get"
|
|
|
|
"post"
|
|
|
|
"test_build_api_url"
|
2021-04-08 16:26:57 +00:00
|
|
|
"test_ctor_mtls"
|
2021-08-18 13:19:15 +00:00
|
|
|
"test_hmac_key_crud"
|
|
|
|
"test_list_buckets"
|
2021-04-08 16:26:57 +00:00
|
|
|
"test_open"
|
2021-08-18 13:19:15 +00:00
|
|
|
"test_anonymous_client_access_to_public_bucket"
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/unit/test_bucket.py"
|
|
|
|
"tests/system/test_blob.py"
|
|
|
|
"tests/system/test_bucket.py"
|
|
|
|
"tests/system/test_fileio.py"
|
|
|
|
"tests/system/test_kms_integration.py"
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# prevent google directory from shadowing google imports
|
|
|
|
preCheck = ''
|
|
|
|
rm -r google
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "google.cloud.storage" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Google Cloud Storage API client library";
|
|
|
|
homepage = "https://github.com/googleapis/python-storage";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|