1
0

Accepting request 973994 from home:mcepl:branches:devel:languages:python

- 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)

OBS-URL: https://build.opensuse.org/request/show/973994
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-google-api-core?expand=0&rev=38
This commit is contained in:
Matej Cepl 2022-04-29 22:01:15 +00:00 committed by Git OBS Bridge
parent dcf8e85d97
commit 3d38aed7dc
5 changed files with 47 additions and 10 deletions

View File

@ -0,0 +1,19 @@
From a8065793e7118c47fc71edc4c02447ef4b665209 Mon Sep 17 00:00:00 2001
From: Anthonios Partheniou <partheniou@google.com>
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)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b0fa577e512f0c8e063386b974718b8614586a798c5894ed34bedf256d9dae24
size 122056

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65480309a7437f739e4476da037af02a3ec8263f1d1f89f72bbdc8f54fe402d2
size 121907

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Apr 25 12:30:45 UTC 2022 - Matej Cepl <mcepl@suse.com>
- 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 <adrian.glaubitz@suse.com>

View File

@ -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