depot/third_party/nixpkgs/pkgs/development/python-modules/google-cloud-storage/default.nix
Default email a6d62be0d1 Project import generated by Copybara.
GitOrigin-RevId: ac169ec6371f0d835542db654a65e0f2feb07838
2021-12-26 18:43:05 +01:00

75 lines
1.6 KiB
Nix

{ 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";
version = "1.43.0";
src = fetchPypi {
inherit pname version;
sha256 = "f3b4f4be5c8a1b5727a8f7136c94d3bacdd4b7bf11f9553f51ae4c1d876529d3";
};
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"
"test_ctor_mtls"
"test_hmac_key_crud"
"test_list_buckets"
"test_open"
"test_anonymous_client_access_to_public_bucket"
];
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"
];
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 = with lib; {
description = "Google Cloud Storage API client library";
homepage = "https://github.com/googleapis/python-storage";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}