ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-pubsub / default.nix
blobc54d2bf0ee9e1cdc8d467af099f46e4d2da75108
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   google-api-core,
6   google-cloud-testutils,
7   grpc-google-iam-v1,
8   grpcio-status,
9   grpcio,
10   libcst,
11   opentelemetry-api,
12   opentelemetry-sdk,
13   proto-plus,
14   protobuf,
15   pytest-asyncio,
16   pytestCheckHook,
17   pythonOlder,
18   setuptools,
21 buildPythonPackage rec {
22   pname = "google-cloud-pubsub";
23   version = "2.27.1";
24   pyproject = true;
26   disabled = pythonOlder "3.7";
28   src = fetchPypi {
29     pname = "google_cloud_pubsub";
30     inherit version;
31     hash = "sha256-cRnbxa9LkV7N+hKJkZ95GkMpJ+qqe7++t0Dm1wIMGB4=";
32   };
34   build-system = [ setuptools ];
36   dependencies = [
37     google-api-core
38     grpc-google-iam-v1
39     grpcio
40     grpcio-status
41     libcst
42     opentelemetry-api
43     opentelemetry-sdk
44     proto-plus
45     protobuf
46   ] ++ google-api-core.optional-dependencies.grpc;
48   optional-dependencies = {
49     libcst = [ libcst ];
50   };
52   nativeCheckInputs = [
53     google-cloud-testutils
54     pytestCheckHook
55     pytest-asyncio
56   ];
58   preCheck = ''
59     # prevent google directory from shadowing google imports
60     rm -r google
61   '';
63   disabledTestPaths = [
64     # Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
65     "tests/unit/pubsub_v1"
66   ];
68   pythonImportsCheck = [ "google.cloud.pubsub" ];
70   meta = with lib; {
71     description = "Google Cloud Pub/Sub API client library";
72     homepage = "https://github.com/googleapis/python-pubsub";
73     changelog = "https://github.com/googleapis/python-pubsub/blob/v${version}/CHANGELOG.md";
74     license = licenses.asl20;
75     maintainers = [ ];
76     mainProgram = "fixup_pubsub_v1_keywords.py";
77   };