diff --git a/pkgs/development/python-modules/google_cloud_spanner/default.nix b/pkgs/development/python-modules/google_cloud_spanner/default.nix index ce03add44e4f..4e86908b4260 100644 --- a/pkgs/development/python-modules/google_cloud_spanner/default.nix +++ b/pkgs/development/python-modules/google_cloud_spanner/default.nix @@ -1,35 +1,32 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -, grpc_google_iam_v1 -, grpcio-gcp -, google_api_core -, google_cloud_core -, pytest -, mock -}: +{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder +, grpc_google_iam_v1, grpcio-gcp, google_api_core, google_cloud_core +, google_cloud_testutils, mock, pytest }: buildPythonPackage rec { pname = "google-cloud-spanner"; - version = "1.17.1"; + version = "1.19.1"; src = fetchPypi { inherit pname version; - sha256 = "3240a04eaa6496e9d8bf4929f4ff04de1652621fd49555eb83b743c48ed9ca04"; + sha256 = "0b9ifh9i4hkcs19b4l6v8j8v93yd8p3j19qrrjvvf5a44bc7bhsh"; }; - checkInputs = [ pytest mock ]; - propagatedBuildInputs = [ grpcio-gcp grpc_google_iam_v1 google_api_core google_cloud_core ]; + disabled = pythonOlder "3.5"; - # avoid importing local package - checkPhase = '' + checkInputs = [ google_cloud_testutils mock pytestCheckHook ]; + propagatedBuildInputs = + [ grpcio-gcp grpc_google_iam_v1 google_api_core google_cloud_core ]; + + # prevent google directory from shadowing google imports + # remove tests that require credentials + preCheck = '' rm -r google - pytest tests/unit + rm tests/system/test_system.py ''; meta = with stdenv.lib; { description = "Cloud Spanner API client library"; - homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; + homepage = "https://pypi.org/project/google-cloud-spanner"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; };