1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, google-api-core
6, google-cloud-testutils
7, grpc_google_iam_v1
8, libcst
9, mock
10, proto-plus
11, pytest-asyncio
12}:
13
14buildPythonPackage rec {
15 pname = "google-cloud-pubsub";
16 version = "2.4.1";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "sha256-5gyqZ+JthC/Qja8ZCX79r4K+evuZY5jPZ73cA6hrgSA=";
21 };
22
23 propagatedBuildInputs = [ grpc_google_iam_v1 google-api-core libcst proto-plus ];
24
25 checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ];
26
27 preCheck = ''
28 # prevent google directory from shadowing google imports
29 rm -r google
30 # Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
31 rm -r tests/unit/pubsub_v1
32 '';
33
34 pythonImportsCheck = [ "google.cloud.pubsub" ];
35
36 meta = with lib; {
37 description = "Google Cloud Pub/Sub API client library";
38 homepage = "https://pypi.org/project/google-cloud-pubsub";
39 license = licenses.asl20;
40 maintainers = with maintainers; [ SuperSandro2000 ];
41 };
42}