python3Packages.google_cloud_pubsub: 1.7.0 -> 2.1.0

This commit is contained in:
Austin Butler 2020-11-02 17:16:49 -08:00 committed by Jonathan Ringer
parent 9324ba634d
commit 24d644de7d

View file

@ -1,36 +1,34 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, enum34
, grpc_google_iam_v1
, google_api_core
, pytest
, mock
}:
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, pytestCheckHook
, google_api_core, google_cloud_testutils, grpc_google_iam_v1, libcst, mock
, proto-plus, pytest-asyncio }:
buildPythonPackage rec {
pname = "google-cloud-pubsub";
version = "1.7.0";
version = "2.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "c8d098ebd208d00c8f3bb55eefecd8553e7391d59700426a97d35125f0dcb248";
sha256 = "0358g5q4igq1pgy8dznbbkc6y7zf36y4m81hhh8hvzzhaa37vc22";
};
checkInputs = [ pytest mock ];
propagatedBuildInputs = [ enum34 grpc_google_iam_v1 google_api_core ];
disabled = pythonOlder "3.6";
# tests don't clean up file descriptors correctly
doCheck = false;
checkPhase = ''
pytest tests/unit
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
'';
pythonImportsCheck = [ "google.cloud.pubsub" ];
meta = with stdenv.lib; {
description = "Google Cloud Pub/Sub API client library";
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
homepage = "https://pypi.org/project/google-cloud-pubsub";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};