From 9a902f2a71e336949954691ad7c8f1f59d19962f Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Mon, 2 Nov 2020 17:19:22 -0800 Subject: [PATCH] python3Packages.google_cloud_texttospeech: fix build --- .../google_cloud_texttospeech/default.nix | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/google_cloud_texttospeech/default.nix b/pkgs/development/python-modules/google_cloud_texttospeech/default.nix index 3a052c73cda..32e8fa223a8 100644 --- a/pkgs/development/python-modules/google_cloud_texttospeech/default.nix +++ b/pkgs/development/python-modules/google_cloud_texttospeech/default.nix @@ -1,10 +1,5 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -, google_api_core -, pytest -, mock -}: +{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder +, google_api_core, libcst, mock, proto-plus, pytest-asyncio, }: buildPythonPackage rec { pname = "google-cloud-texttospeech"; @@ -15,16 +10,17 @@ buildPythonPackage rec { sha256 = "cbbd397e72b6189668134f3c8e8c303198188334a4e6a5f77cc90c3220772f9e"; }; - checkInputs = [ pytest mock ]; - propagatedBuildInputs = [ google_api_core ]; + disabled = pythonOlder "3.5"; - checkPhase = '' - pytest tests/unit - ''; + checkInputs = [ mock pytest-asyncio pytestCheckHook ]; + propagatedBuildInputs = [ google_api_core libcst proto-plus ]; + + # Disable tests that require credentials + disabledTests = ["test_synthesize_speech" "test_list_voices"]; meta = with stdenv.lib; { description = "Google Cloud Text-to-Speech API client library"; - homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; + homepage = "https://github.com/googleapis/python-texttospeech"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; };