2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, google-auth
|
|
|
|
, google-cloud-core
|
2023-01-11 07:51:40 +00:00
|
|
|
, google-cloud-iam
|
2021-01-09 10:05:03 +00:00
|
|
|
, google-cloud-kms
|
|
|
|
, google-cloud-testutils
|
|
|
|
, google-resumable-media
|
|
|
|
, mock
|
2023-01-11 07:51:40 +00:00
|
|
|
, protobuf
|
|
|
|
, pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2023-01-11 07:51:40 +00:00
|
|
|
, requests
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-storage";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.9.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-m2rntQn8KUvay4TQ8+qOIOLFSotLvjnFcHY1/sIU7/M=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-auth
|
|
|
|
google-cloud-core
|
|
|
|
google-resumable-media
|
2023-01-11 07:51:40 +00:00
|
|
|
requests
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
protobuf = [
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
google-cloud-iam
|
|
|
|
google-cloud-kms
|
|
|
|
google-cloud-testutils
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# Disable tests which require credentials and network access
|
2021-01-09 10:05:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
"create"
|
|
|
|
"download"
|
|
|
|
"get"
|
|
|
|
"post"
|
2022-02-10 20:34:41 +00:00
|
|
|
"upload"
|
2021-01-09 10:05:03 +00:00
|
|
|
"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"
|
2023-01-11 07:51:40 +00:00
|
|
|
"test_ctor_w_custom_endpoint_use_auth"
|
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"
|
2023-01-11 07:51:40 +00:00
|
|
|
"tests/unit/test_transfer_manager.py"
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
2021-10-14 00:43:12 +00:00
|
|
|
# prevent google directory from shadowing google imports
|
2021-01-09 10:05:03 +00:00
|
|
|
rm -r google
|
2021-10-14 00:43:12 +00:00
|
|
|
|
|
|
|
# requires docker and network
|
|
|
|
rm tests/conformance/test_conformance.py
|
2021-01-09 10:05:03 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.cloud.storage"
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Google Cloud Storage API client library";
|
|
|
|
homepage = "https://github.com/googleapis/python-storage";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/googleapis/python-storage/blob/v${version}/CHANGELOG.md";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|