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