2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-01-05 13:30:37 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
2021-01-06 09:46:48 +00:00
|
|
|
, google-api-core
|
|
|
|
, google-cloud-core
|
|
|
|
, google-cloud-testutils
|
2021-01-05 13:30:37 +00:00
|
|
|
, grpcio
|
|
|
|
, libcst
|
|
|
|
, mock
|
|
|
|
, proto-plus
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
2018-11-02 20:35:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-translate";
|
2020-12-12 19:39:57 +00:00
|
|
|
version = "3.0.2";
|
2018-11-02 20:35:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-05 13:30:37 +00:00
|
|
|
sha256 = "1s2gvlzfqd2gsrzaz7yl9q8s1k03dlsjahgg95s017vlcn21d0v1";
|
2018-11-02 20:35:02 +00:00
|
|
|
};
|
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
propagatedBuildInputs = [ google-api-core google-cloud-core libcst proto-plus ];
|
2020-11-03 01:19:33 +00:00
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ];
|
2018-11-02 20:35:02 +00:00
|
|
|
|
2020-11-03 01:19:33 +00:00
|
|
|
preCheck = ''
|
2021-01-05 13:30:37 +00:00
|
|
|
# prevent shadowing imports
|
2020-11-03 01:19:33 +00:00
|
|
|
rm -r google
|
2018-11-02 20:35:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-05 13:30:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.cloud.translate"
|
|
|
|
"google.cloud.translate_v2"
|
|
|
|
"google.cloud.translate_v3"
|
|
|
|
"google.cloud.translate_v3beta1"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-02 20:35:02 +00:00
|
|
|
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;
|
2021-01-05 13:30:37 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2018-11-02 20:35:02 +00:00
|
|
|
};
|
|
|
|
}
|