2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-01-05 14:50:57 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
2021-01-06 09:46:48 +00:00
|
|
|
, google-api-core
|
|
|
|
, google-cloud-testutils
|
2021-01-05 14:50:57 +00:00
|
|
|
, grpc_google_iam_v1
|
|
|
|
, libcst
|
|
|
|
, mock
|
|
|
|
, proto-plus
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
2018-11-02 19:53:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-pubsub";
|
2021-02-09 03:37:15 +00:00
|
|
|
version = "2.3.0";
|
2018-11-02 19:53:13 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-09 03:37:15 +00:00
|
|
|
sha256 = "b19f0556c252b805a52c976e3317c53d91e36f56dc8d28192eea190627faf343";
|
2018-11-02 19:53:13 +00:00
|
|
|
};
|
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
propagatedBuildInputs = [ grpc_google_iam_v1 google-api-core libcst proto-plus ];
|
2018-11-02 19:53:13 +00:00
|
|
|
|
2021-01-06 09:46:48 +00:00
|
|
|
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ];
|
2020-11-03 01:16:49 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
2021-01-05 14:50:57 +00:00
|
|
|
# prevent google directory from shadowing google imports
|
2020-11-03 01:16:49 +00:00
|
|
|
rm -r google
|
2021-01-05 14:50:57 +00:00
|
|
|
# Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
|
2020-11-03 01:16:49 +00:00
|
|
|
rm -r tests/unit/pubsub_v1
|
2018-11-02 19:53:13 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-01 22:45:03 +00:00
|
|
|
pythonImportsCheck = [ "google.cloud.pubsub" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-02 19:53:13 +00:00
|
|
|
description = "Google Cloud Pub/Sub API client library";
|
2020-11-03 01:16:49 +00:00
|
|
|
homepage = "https://pypi.org/project/google-cloud-pubsub";
|
2018-11-02 19:53:13 +00:00
|
|
|
license = licenses.asl20;
|
2021-01-05 14:50:57 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2018-11-02 19:53:13 +00:00
|
|
|
};
|
|
|
|
}
|