From 07ad761bfc6a6600bc0c466a34bd63fc892b9ec3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 6 Jun 2021 23:01:07 +0200 Subject: [PATCH] python3Packages.google-cloud-bigtable: fix build --- .../google-cloud-bigtable/default.nix | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-bigtable/default.nix b/pkgs/development/python-modules/google-cloud-bigtable/default.nix index 67c6ebde4237..f7eb9a51a8a3 100644 --- a/pkgs/development/python-modules/google-cloud-bigtable/default.nix +++ b/pkgs/development/python-modules/google-cloud-bigtable/default.nix @@ -1,11 +1,13 @@ { lib , buildPythonPackage , fetchPypi -, grpc_google_iam_v1 , google-api-core , google-cloud-core -, pytest +, grpc_google_iam_v1 +, libcst , mock +, proto-plus +, pytestCheckHook }: buildPythonPackage rec { @@ -17,17 +19,37 @@ buildPythonPackage rec { sha256 = "sha256-89fXmr3jHTtp8QOMFeueJwslHJ7Q6srQ/Kxsp0mLlKU="; }; - checkInputs = [ pytest mock ]; - propagatedBuildInputs = [ grpc_google_iam_v1 google-api-core google-cloud-core ]; + propagatedBuildInputs = [ + google-api-core + google-cloud-core + grpc_google_iam_v1 + libcst + proto-plus + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; checkPhase = '' + # Prevent google directory from shadowing google imports rm -r google - pytest tests/unit -k 'not policy' ''; + disabledTests = [ + "policy" + ]; + + pythonImportsCheck = [ + "google.cloud.bigtable_admin_v2" + "google.cloud.bigtable_v2" + "google.cloud.bigtable" + ]; + meta = with lib; { description = "Google Cloud Bigtable API client library"; - homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; + homepage = "https://github.com/googleapis/python-bigtable"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; };