Files
nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix
T
Martin Weinelt b79da2786f Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/bundlewrap/default.nix
	pkgs/development/python-modules/coverage/default.nix
	pkgs/development/python-modules/h5netcdf/default.nix
	pkgs/development/python-modules/hypothesis/default.nix
	pkgs/development/python-modules/numba/default.nix
	pkgs/development/python-modules/optype/default.nix
	pkgs/development/python-modules/setuptools-git-versioning/default.nix
	pkgs/development/python-modules/sphinx/default.nix
2026-02-15 16:17:41 +01:00

109 lines
2.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
google-auth,
google-cloud-core,
google-cloud-iam,
google-cloud-kms,
google-cloud-testutils,
google-resumable-media,
mock,
protobuf,
pytestCheckHook,
pytest-asyncio,
requests,
setuptools,
}:
buildPythonPackage rec {
pname = "google-cloud-storage";
version = "3.8.0";
pyproject = true;
src = fetchFromGitHub {
owner = "googleapis";
repo = "python-storage";
tag = "v${version}";
hash = "sha256-CHku6tiELE3deP6ZCRx/ekn60FmF3gO51cOAF1DkQrI=";
};
pythonRelaxDeps = [ "google-auth" ];
build-system = [ setuptools ];
dependencies = [
google-auth
google-cloud-core
google-resumable-media
requests
];
optional-dependencies = {
protobuf = [ protobuf ];
};
nativeCheckInputs = [
google-cloud-iam
google-cloud-kms
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
enabledTestPaths = [
"tests/unit/"
"tests/system/"
];
disabledTests = [
# Disable tests which require credentials and network access
"create"
"download"
"get"
"post"
"test_anonymous_client_access_to_public_bucket"
"test_build_api_url"
"test_ctor_mtls"
"test_ctor_w_api_endpoint_override"
"test_ctor_w_custom_endpoint_use_auth"
"test_hmac_key_crud"
"test_list_buckets"
"test_open"
"test_restore_bucket"
"test_set_api_request_attr"
"upload"
"test_update_user_agent_when_default_clientinfo_provided"
"test_update_user_agent_when_none_clientinfo_provided"
"test_update_user_agent_with_existing_user_agent"
];
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"
"tests/unit/test_transfer_manager.py"
];
preCheck = ''
# prevent google directory from shadowing google imports
rm -r google
# requires docker and network
rm tests/conformance/test_conformance.py
'';
pythonImportsCheck = [ "google.cloud.storage" ];
meta = {
description = "Google Cloud Storage API client library";
homepage = "https://github.com/googleapis/python-storage";
changelog = "https://github.com/googleapis/python-storage/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ sarahec ];
};
}