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-25 00:11:37 +00:00
|
|
|
version = "2.4.0";
|
2018-11-02 19:53:13 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-25 00:11:37 +00:00
|
|
|
sha256 = "ff9933573dadb02176dc514662354949d0ea784cc4588d22226c2bf7eb90e797";
|
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
|
|
|
};
|
|
|
|
}
|