2020-11-03 01:16:49 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, pytestCheckHook
|
|
|
|
, google_api_core, google_cloud_testutils, 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;
|
2020-12-07 04:08:44 +00:00
|
|
|
sha256 = "bc50a60803f5c409a295ec0e31cdd4acc271611ce3f4963a072036bbfa5ccde5";
|
2018-11-02 19:53:13 +00:00
|
|
|
};
|
|
|
|
|
2020-11-03 01:16:49 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-11-02 19:53:13 +00:00
|
|
|
|
2020-11-03 01:16:49 +00:00
|
|
|
checkInputs = [ google_cloud_testutils mock pytestCheckHook pytest-asyncio ];
|
|
|
|
propagatedBuildInputs =
|
|
|
|
[ grpc_google_iam_v1 google_api_core libcst proto-plus ];
|
|
|
|
|
|
|
|
# prevent google directory from shadowing google imports
|
|
|
|
# Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
|
|
|
|
preCheck = ''
|
|
|
|
rm -r google
|
|
|
|
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" ];
|
|
|
|
|
2018-11-02 19:53:13 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|