aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix35
1 files changed, 20 insertions, 15 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix
index f25f4badc815..60f9e3e11ae9 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_translate/default.nix
@@ -1,12 +1,6 @@
-{ stdenv
-, buildPythonPackage
-, fetchPypi
-, google_api_core
-, google_cloud_core
-, grpcio
-, pytest
-, mock
-}:
+{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
+, google_api_core, google_cloud_core, google_cloud_testutils, grpcio, libcst
+, mock, proto-plus, pytest-asyncio }:
buildPythonPackage rec {
pname = "google-cloud-translate";
@@ -17,18 +11,29 @@ buildPythonPackage rec {
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
};
+ disabled = pythonOlder "3.6";
+
# google_cloud_core[grpc] -> grpcio
- propagatedBuildInputs = [ google_api_core google_cloud_core grpcio ];
+ propagatedBuildInputs =
+ [ google_api_core google_cloud_core grpcio libcst proto-plus ];
+
+ checkInputs = [ google_cloud_testutils mock pytest-asyncio pytestCheckHook ];
+
+ # test_http.py broken, fix not yet released
+ # https://github.com/googleapis/python-translate/pull/69
+ disabledTests = [
+ "test_build_api_url_w_extra_query_params"
+ "test_build_api_url_no_extra_query_params"
+ "test_build_api_url_w_custom_endpoint"
+ ];
- checkInputs = [ pytest mock ];
- checkPhase = ''
- cd tests # prevent local google/__init__.py from getting loaded
- pytest unit -k 'not extra_headers'
+ preCheck = ''
+ rm -r google
'';
meta = with stdenv.lib; {
description = "Google Cloud Translation API client library";
- homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
+ homepage = "https://github.com/googleapis/python-translate";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};