2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-01-09 10:05:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, google-api-core
|
|
|
|
, google-cloud-core
|
|
|
|
, google-cloud-testutils
|
|
|
|
, grpcio
|
|
|
|
, libcst
|
|
|
|
, mock
|
|
|
|
, proto-plus
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-translate";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "3.4.1";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-14 00:43:12 +00:00
|
|
|
sha256 = "sha256-cxuLaZ4cBdsWsyfRqb4NJ1+RWZSJhvTTclYF9uy6QM4=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-api-core
|
|
|
|
google-cloud-core
|
|
|
|
libcst
|
|
|
|
proto-plus
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
checkInputs = [
|
|
|
|
google-cloud-testutils
|
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# prevent shadowing imports
|
|
|
|
rm -r google
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.cloud.translate"
|
|
|
|
"google.cloud.translate_v2"
|
|
|
|
"google.cloud.translate_v3"
|
|
|
|
"google.cloud.translate_v3beta1"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Google Cloud Translation API client library";
|
|
|
|
homepage = "https://github.com/googleapis/python-translate";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|