python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / google-api-core / default.nix
blob5254ba230cda2908778d08bfb6e62e5966040c42
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   google-auth,
6   googleapis-common-protos,
7   grpcio,
8   grpcio-gcp,
9   grpcio-status,
10   mock,
11   proto-plus,
12   protobuf,
13   pytest-asyncio,
14   pytestCheckHook,
15   pythonOlder,
16   requests,
17   setuptools,
20 buildPythonPackage rec {
21   pname = "google-api-core";
22   version = "2.24.0";
23   pyproject = true;
25   disabled = pythonOlder "3.7";
27   src = fetchFromGitHub {
28     owner = "googleapis";
29     repo = "python-api-core";
30     tag = "v${version}";
31     hash = "sha256-6U5rNhF4AYWae50pNIqDdlMzRhW4iV9vPlMPXN11DqQ=";
32   };
34   build-system = [ setuptools ];
36   dependencies = [
37     googleapis-common-protos
38     google-auth
39     protobuf
40     proto-plus
41     requests
42   ];
44   optional-dependencies = {
45     async_rest = [ google-auth ] ++ google-auth.optional-dependencies.aiohttp;
46     grpc = [
47       grpcio
48       grpcio-status
49     ];
50     grpcgcp = [ grpcio-gcp ];
51     grpcio-gcp = [ grpcio-gcp ];
52   };
54   nativeCheckInputs = [
55     mock
56     pytest-asyncio
57     pytestCheckHook
58   ];
60   # prevent google directory from shadowing google imports
61   preCheck = ''
62     rm -r google
63   '';
65   disabledTests = [
66     # Those grpc_helpers tests are failing
67     "test_wrap_unary_errors"
68     "test_wrap_stream_errors_raised"
69     "test_wrap_stream_errors_read"
70     "test_wrap_stream_errors_aiter"
71     "test_wrap_stream_errors_write"
72     "test_wrap_unary_errors"
73     "test___next___w_rpc_error"
74     "test_wrap_stream_errors_invocation"
75     "test_wrap_stream_errors_iterator_initialization"
76     "test_wrap_stream_errors_during_iteration"
77     "test_exception_with_error_code"
78   ];
80   pythonImportsCheck = [ "google.api_core" ];
82   meta = with lib; {
83     description = "Core Library for Google Client Libraries";
84     longDescription = ''
85       This library is not meant to stand-alone. Instead it defines common
86       helpers used by all Google API clients.
87     '';
88     homepage = "https://github.com/googleapis/python-api-core";
89     changelog = "https://github.com/googleapis/python-api-core/blob/v${version}/CHANGELOG.md";
90     license = licenses.asl20;
91     maintainers = [ ];
92   };