2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
google-auth,
|
|
|
|
google-cloud-core,
|
|
|
|
google-cloud-iam,
|
|
|
|
google-cloud-kms,
|
|
|
|
google-cloud-testutils,
|
|
|
|
google-resumable-media,
|
|
|
|
mock,
|
|
|
|
protobuf,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-storage";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.17.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-STeKv/VO9la1Lcpe8PLrqaqD3CsscseHFLA6GpX+k4g=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "google-auth" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
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 = {
|
2024-06-05 15:53:02 +00:00
|
|
|
protobuf = [ protobuf ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
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"
|
2024-04-21 15:54:59 +00:00
|
|
|
"test_ctor_w_api_endpoint_override"
|
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
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|