diff --git a/pkgs/development/python-modules/google_cloud_storage/default.nix b/pkgs/development/python-modules/google_cloud_storage/default.nix index 7a92e731042..bcb8b604e45 100644 --- a/pkgs/development/python-modules/google_cloud_storage/default.nix +++ b/pkgs/development/python-modules/google_cloud_storage/default.nix @@ -1,13 +1,7 @@ -{ lib -, buildPythonPackage -, fetchPypi -, google_resumable_media -, google_api_core -, google_cloud_core -, pytest -, mock -, setuptools -}: +{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder +, google_api_core, google_auth, google-cloud-iam, google_cloud_core +, google_cloud_kms, google_cloud_testutils, google_resumable_media, mock +, requests }: buildPythonPackage rec { pname = "google-cloud-storage"; @@ -18,27 +12,36 @@ buildPythonPackage rec { sha256 = "da12b7bd79bbe978a7945a44b600604fbc10ece2935d31f243e751f99135e34f"; }; + disabled = pythonOlder "3.5"; + propagatedBuildInputs = [ google_api_core + google_auth google_cloud_core google_resumable_media - setuptools + requests ]; checkInputs = [ + google-cloud-iam + google_cloud_kms + google_cloud_testutils mock - pytest + pytestCheckHook ]; - # remove directory from interferring with importing modules - # ignore tests which require credentials - checkPhase = '' + # disable tests which require credentials + disabledTests = [ "create" "get" "post" "test_build_api_url" ]; + + # prevent google directory from shadowing google imports + # remove tests which require credentials + preCheck = '' rm -r google - pytest tests/unit -k 'not (create or get or post)' + rm tests/system/test_system.py tests/unit/test_client.py ''; meta = with lib; { description = "Google Cloud Storage API client library"; - homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; + homepage = "https://github.com/googleapis/python-storage"; license = licenses.asl20; maintainers = with maintainers; [ costrouc ]; };