2018-11-02 21:35:02 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, google_api_core
|
|
|
|
, google_cloud_core
|
2019-11-22 03:09:00 +01:00
|
|
|
, grpcio
|
2018-11-02 21:35:02 +01:00
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-translate";
|
2020-08-16 19:31:02 +02:00
|
|
|
version = "3.0.1";
|
2018-11-02 21:35:02 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 19:31:02 +02:00
|
|
|
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
|
2018-11-02 21:35:02 +01:00
|
|
|
};
|
|
|
|
|
2019-11-22 03:09:00 +01:00
|
|
|
# google_cloud_core[grpc] -> grpcio
|
|
|
|
propagatedBuildInputs = [ google_api_core google_cloud_core grpcio ];
|
2018-11-02 21:35:02 +01:00
|
|
|
|
2019-11-22 03:09:00 +01:00
|
|
|
checkInputs = [ pytest mock ];
|
2018-11-02 21:35:02 +01:00
|
|
|
checkPhase = ''
|
2019-11-22 03:09:00 +01:00
|
|
|
cd tests # prevent local google/__init__.py from getting loaded
|
2020-03-18 23:38:47 +01:00
|
|
|
pytest unit -k 'not extra_headers'
|
2018-11-02 21:35:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Google Cloud Translation API client library";
|
2020-03-18 23:38:47 +01:00
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
|
2018-11-02 21:35:02 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|