2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
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";
|
2020-12-07 04:08:44 +00:00
|
|
|
version = "2.2.0";
|
2018-11-02 19:53:13 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-05 14:50:57 +00:00
|
|
|
sha256 = "1rfdbkxbndi00wx9dx733ihp3hmcsk6k23pcjni0ki7m0c4acl5w";
|
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
|
|
|
};
|
|
|
|
}
|