pythonPackages.google_cloud_translate: Cleanups

This commit is contained in:
Sandro Jäckel 2021-01-05 14:30:37 +01:00
parent bbadd211f7
commit 03742dfbca
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,6 +1,16 @@
{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder { stdenv
, google_api_core, google_cloud_core, google_cloud_testutils, grpcio, libcst , buildPythonPackage
, mock, proto-plus, pytest-asyncio }: , fetchPypi
, pytestCheckHook
, google_api_core
, google_cloud_core
, google_cloud_testutils
, grpcio
, libcst
, mock
, proto-plus
, pytest-asyncio
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "google-cloud-translate"; pname = "google-cloud-translate";
@ -8,33 +18,29 @@ buildPythonPackage rec {
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "6183168465749f007449ef4125356d03cca0114ed49faf7ed64f34ec3edd4fe8"; sha256 = "1s2gvlzfqd2gsrzaz7yl9q8s1k03dlsjahgg95s017vlcn21d0v1";
}; };
disabled = pythonOlder "3.6"; propagatedBuildInputs = [ google_api_core google_cloud_core libcst proto-plus ];
# google_cloud_core[grpc] -> grpcio checkInputs = [ google_cloud_testutils mock pytestCheckHook pytest-asyncio ];
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"
];
preCheck = '' preCheck = ''
# prevent shadowing imports
rm -r google rm -r google
''; '';
pythonImportsCheck = [
"google.cloud.translate"
"google.cloud.translate_v2"
"google.cloud.translate_v3"
"google.cloud.translate_v3beta1"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Google Cloud Translation API client library"; description = "Google Cloud Translation API client library";
homepage = "https://github.com/googleapis/python-translate"; homepage = "https://github.com/googleapis/python-translate";
license = licenses.asl20; license = licenses.asl20;
maintainers = [ maintainers.costrouc ]; maintainers = with maintainers; [ SuperSandro2000 ];
}; };
} }