Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-pubsub / default.nix
blob079d482b35e7a22ad0ccb0f82a5a79cf755b3070
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   google-api-core,
6   google-cloud-testutils,
7   grpc-google-iam-v1,
8   grpcio,
9   grpcio-status,
10   libcst,
11   proto-plus,
12   protobuf,
13   pytest-asyncio,
14   pytestCheckHook,
15   pythonOlder,
16   setuptools,
19 buildPythonPackage rec {
20   pname = "google-cloud-pubsub";
21   version = "2.21.1";
22   pyproject = true;
24   disabled = pythonOlder "3.7";
26   src = fetchPypi {
27     inherit pname version;
28     hash = "sha256-MfzwdES3+BOmFsS2UOH78dyZigiP4AWadhZIVawX8Fw=";
29   };
31   build-system = [ setuptools ];
33   dependencies = [
34     google-api-core
35     grpc-google-iam-v1
36     grpcio
37     grpcio-status
38     libcst
39     proto-plus
40     protobuf
41   ] ++ google-api-core.optional-dependencies.grpc;
43   passthru.optional-dependencies = {
44     libcst = [ libcst ];
45   };
47   nativeCheckInputs = [
48     google-cloud-testutils
49     pytestCheckHook
50     pytest-asyncio
51   ];
53   preCheck = ''
54     # prevent google directory from shadowing google imports
55     rm -r google
56   '';
58   disabledTestPaths = [
59     # Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
60     "tests/unit/pubsub_v1"
61   ];
63   pythonImportsCheck = [ "google.cloud.pubsub" ];
65   meta = with lib; {
66     description = "Google Cloud Pub/Sub API client library";
67     mainProgram = "fixup_pubsub_v1_keywords.py";
68     homepage = "https://github.com/googleapis/python-pubsub";
69     changelog = "https://github.com/googleapis/python-pubsub/blob/v${version}/CHANGELOG.md";
70     license = licenses.asl20;
71     maintainers = with maintainers; [ ];
72   };