Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-translate / default.nix
blob2eb65c2a61a233ddfba0d61d59ef20e4dccef693
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 , setuptools
16 buildPythonPackage rec {
17   pname = "google-cloud-translate";
18   version = "3.15.3";
19   pyproject = true;
21   disabled = pythonOlder "3.7";
23   src = fetchPypi {
24     inherit pname version;
25     hash = "sha256-7Vh6HmDPhHw7Gt1rKCVuLRci+nOkKFM09excqTPmFvI=";
26   };
28   nativeBuildInputs = [
29     setuptools
30   ];
32   propagatedBuildInputs = [
33     google-api-core
34     google-cloud-core
35     proto-plus
36     protobuf
37   ] ++ google-api-core.optional-dependencies.grpc;
39   nativeCheckInputs = [
40     google-cloud-testutils
41     mock
42     pytest-asyncio
43     pytestCheckHook
44   ];
46   preCheck = ''
47     # prevent shadowing imports
48     rm -r google
49   '';
51   pythonImportsCheck = [
52     "google.cloud.translate"
53     "google.cloud.translate_v2"
54     "google.cloud.translate_v3"
55     "google.cloud.translate_v3beta1"
56   ];
58   disabledTests = [
59     # Tests require PROJECT_ID
60     "test_list_glossaries"
61   ];
63   meta = with lib; {
64     description = "Google Cloud Translation API client library";
65     homepage = "https://github.com/googleapis/python-translate";
66     changelog = "https://github.com/googleapis/python-translate/blob/v${version}/CHANGELOG.md";
67     license = licenses.asl20;
68     maintainers = with maintainers; [ ];
69   };