1{ lib 2, buildPythonPackage 3, fetchPypi 4, google-api-core 5, google-cloud-core 6, google-cloud-testutils 7, mock 8, proto-plus 9, protobuf 10, pytest-asyncio 11, pytestCheckHook 12, pythonOlder 13}: 14 15buildPythonPackage rec { 16 pname = "google-cloud-translate"; 17 version = "3.12.1"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-Zhy4h5qjxjovclo+po+QGZvTVMlcoWnMLoOlEFmH0p4="; 25 }; 26 27 propagatedBuildInputs = [ 28 google-api-core 29 google-cloud-core 30 proto-plus 31 protobuf 32 ] ++ google-api-core.optional-dependencies.grpc; 33 34 nativeCheckInputs = [ 35 google-cloud-testutils 36 mock 37 pytestCheckHook 38 pytest-asyncio 39 ]; 40 41 preCheck = '' 42 # prevent shadowing imports 43 rm -r google 44 ''; 45 46 pythonImportsCheck = [ 47 "google.cloud.translate" 48 "google.cloud.translate_v2" 49 "google.cloud.translate_v3" 50 "google.cloud.translate_v3beta1" 51 ]; 52 53 meta = with lib; { 54 description = "Google Cloud Translation API client library"; 55 homepage = "https://github.com/googleapis/python-translate"; 56 changelog = "https://github.com/googleapis/python-translate/blob/v${version}/CHANGELOG.md"; 57 license = licenses.asl20; 58 maintainers = with maintainers; [ ]; 59 }; 60}