2020-11-03 01:19:33 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
|
|
|
|
, google_api_core, google_cloud_core, google_cloud_testutils, grpcio, libcst
|
|
|
|
, mock, proto-plus, pytest-asyncio }:
|
2018-11-02 20:35:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-translate";
|
2020-08-16 17:31:02 +00:00
|
|
|
version = "3.0.1";
|
2018-11-02 20:35:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 17:31:02 +00:00
|
|
|
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
|
2018-11-02 20:35:02 +00:00
|
|
|
};
|
|
|
|
|
2020-11-03 01:19:33 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2019-11-22 02:09:00 +00:00
|
|
|
# google_cloud_core[grpc] -> grpcio
|
2020-11-03 01:19:33 +00:00
|
|
|
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"
|
|
|
|
];
|
2018-11-02 20:35:02 +00:00
|
|
|
|
2020-11-03 01:19:33 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm -r google
|
2018-11-02 20:35:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google Cloud Translation API client library";
|
2020-11-03 01:19:33 +00:00
|
|
|
homepage = "https://github.com/googleapis/python-translate";
|
2018-11-02 20:35:02 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|