diff --git a/373-KeyError-in-test.patch b/373-KeyError-in-test.patch new file mode 100644 index 0000000..730d85b --- /dev/null +++ b/373-KeyError-in-test.patch @@ -0,0 +1,19 @@ +From a8065793e7118c47fc71edc4c02447ef4b665209 Mon Sep 17 00:00:00 2001 +From: Anthonios Partheniou +Date: Fri, 29 Apr 2022 13:28:02 -0400 +Subject: [PATCH] test: fix KeyError in test_rest_streaming.py + +--- + tests/unit/test_rest_streaming.py | 1 + + 1 file changed, 1 insertion(+) + +--- a/tests/unit/test_rest_streaming.py ++++ b/tests/unit/test_rest_streaming.py +@@ -28,6 +28,7 @@ from google.protobuf import duration_pb2 + from google.protobuf import timestamp_pb2 + + ++__protobuf__ = proto.module(package=__name__) + SEED = int(time.time()) + logging.info(f"Starting rest streaming tests with random seed: {SEED}") + random.seed(SEED) diff --git a/google-api-core-2.7.1.tar.gz b/google-api-core-2.7.1.tar.gz deleted file mode 100644 index 144b41b..0000000 --- a/google-api-core-2.7.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0fa577e512f0c8e063386b974718b8614586a798c5894ed34bedf256d9dae24 -size 122056 diff --git a/google-api-core-2.7.2.tar.gz b/google-api-core-2.7.2.tar.gz new file mode 100644 index 0000000..9875c44 --- /dev/null +++ b/google-api-core-2.7.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65480309a7437f739e4476da037af02a3ec8263f1d1f89f72bbdc8f54fe402d2 +size 121907 diff --git a/python-google-api-core.changes b/python-google-api-core.changes index 541faa4..acd285e 100644 --- a/python-google-api-core.changes +++ b/python-google-api-core.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 25 12:30:45 UTC 2022 - Matej Cepl + +- Update to 2.7.2: + - allow grpc without grpcio-status + - remove dependency on pkg_resources +- Add 373-KeyError-in-test.patch to allow tests to run + (gh#googleapis/python-api-core#372) + ------------------------------------------------------------------- Thu Apr 7 12:20:32 UTC 2022 - John Paul Adrian Glaubitz diff --git a/python-google-api-core.spec b/python-google-api-core.spec index e29b010..b2595b2 100644 --- a/python-google-api-core.spec +++ b/python-google-api-core.spec @@ -27,21 +27,26 @@ %endif %define skip_python2 1 Name: python-google-api-core -Version: 2.7.1 +Version: 2.7.2 Release: 0 Summary: Google API client core library License: Apache-2.0 URL: https://github.com/googleapis/python-api-core Source: https://files.pythonhosted.org/packages/source/g/google-api-core/google-api-core-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 373-KeyError-in-test.patch gh#googleapis/python-api-core#372 mcepl@suse.com +# fix KeyError in test_rest_streaming.py +Patch0: 373-KeyError-in-test.patch BuildRequires: %{python_module google-auth >= 1.25.0} -BuildRequires: %{python_module googleapis-common-protos >= 1.6.0} +BuildRequires: %{python_module googleapis-common-protos >= 1.53.0} BuildRequires: %{python_module grpcio >= 1.33.2} BuildRequires: %{python_module grpcio-gcp >= 0.2.2} BuildRequires: %{python_module grpcio-status >= 1.33.2} +BuildRequires: %{python_module pip} BuildRequires: %{python_module protobuf >= 3.12.0} BuildRequires: %{python_module pytz} BuildRequires: %{python_module requests >= 2.18.0} BuildRequires: %{python_module setuptools >= 40.3.0} +BuildRequires: %{python_module wheel} # START TESTING SECTION %if %{with test} BuildRequires: %{python_module google-api-core >= %{version}} @@ -54,7 +59,7 @@ BuildRequires: %{python_module pytest} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-google-auth >= 1.25.0 -Requires: python-googleapis-common-protos >= 1.6.0 +Requires: python-googleapis-common-protos >= 1.53.0 Requires: python-grpcio >= 1.33.2 Requires: python-grpcio-status >= 1.33.2 Requires: python-protobuf >= 3.12.0 @@ -69,14 +74,14 @@ BuildArch: noarch Core Library for Google Client Libraries. %prep -%setup -q -n google-api-core-%{version} +%autosetup -p1 -n google-api-core-%{version} %build -%python_build +%pyproject_wheel %install %if !%{with test} -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -85,11 +90,15 @@ Core Library for Google Client Libraries. %pytest %endif +%clean + %if !%{with test} %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/google/api_core +%{python_sitelib}/google_api_core-%{version}*-nspkg.pth +%{python_sitelib}/google_api_core-%{version}*-info %endif %changelog