## START: Set by rpmautospec
## (rpmautospec version 0.2.6)
%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
release_number = 4;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
## END: Set by rpmautospec
# F35: Do not update past 2.8.0 because Fedora 35's protobuf is too old.
%bcond_with tests
%global srcname google-api-core
%global forgeurl https://github.com/googleapis/python-api-core
Version: 2.8.2
%global tag v%{version}
%forgemeta
Name: python-%{srcname}
Release: %autorelease
Summary: Core Library for Google Client Libraries
License: ASL 2.0
URL: %forgeurl
Source0: %{url}/archive/%{tag}.tar.gz#/python-api-core-%{version}.tar.gz
Patch0: use-unittest-mock-builtin.patch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-wheel
%if %{with tests}
BuildRequires: python3dist(google-auth)
BuildRequires: python3dist(googleapis-common-protos)
BuildRequires: python3dist(grpcio)
BuildRequires: python3dist(grpcio-gcp)
BuildRequires: python3dist(protobuf)
BuildRequires: python3dist(proto-plus)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytz)
BuildRequires: python3dist(requests)
BuildRequires: python3dist(six)
%endif
BuildArch: noarch
%global _description %{expand:This library is not meant to stand-alone.
Instead it defines common helpers used by all Google API clients.}
%description
%{_description}
%package -n python3-%{srcname}
Summary: %{summary}
# Extras
Requires: python3dist(grpcio)
Requires: python3dist(grpcio-status)
%description -n python3-%{srcname}
%{_description}
%pyproject_extras_subpkg -n python3-%{srcname} grpc
%prep
%forgeautosetup -p1
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files google
%check
%if %{with tests}
# Work around an unusual pytest/PEP 420 issue where pytest can't import the
# installed module. Thanks to mhroncok for the help!
mv google{,_}
%pytest tests/unit \
-k "not test_wrap_unary_errors \
and not test_wrap_stream_errors_invocation \
and not test_wrap_stream_errors_iterator_initialization \
and not test_wrap_stream_errors_during_iteration"
mv google{_,}
%endif
%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst CHANGELOG.md SECURITY.md
%{python3_sitelib}/google_api_core-%{version}-py%{python3_version}-nspkg.pth
%changelog
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 2.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 28 2022 Python Maint <python-maint@redhat.com> 2.8.2-3
- Rebuilt for Python 3.11
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> 2.8.2-2
- Bootstrap for Python 3.11
* Wed Jun 15 2022 Major Hayden <major@redhat.com> 2.8.2-1
- Update to 2.8.2
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> 2.8.1-2
- Bootstrap for Python 3.11
* Fri May 27 2022 Major Hayden <major@mhtx.net> 2.8.1-1
- Update to 2.8.1
* Thu May 19 2022 Major Hayden <major@mhtx.net> 2.8.0-1
- 🚀 Update to 2.8.0
* Mon May 02 2022 Major Hayden <major@mhtx.net> 2.7.3-1
- Update to 2.7.3
* Wed Apr 13 2022 Major Hayden <major@mhtx.net> 2.7.2-1
- Update to 2.7.2
* Thu Mar 10 2022 Major Hayden <major@redhat.com> 2.7.1-1
- Update to 2.7.1
* Wed Mar 09 2022 Major Hayden <major@redhat.com> 2.7.0-1
- Update to 2.7.0
* Tue Mar 08 2022 Major Hayden <major@redhat.com> 2.6.1-1
- Update to 2.6.1
* Fri Mar 04 2022 Major Hayden <major@redhat.com> 2.6.0-1
- Update to 2.6.0
* Fri Feb 04 2022 Major Hayden <major@redhat.com> 2.5.0-1
- Update to 2.5.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 2.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 13 2022 Major Hayden <major@redhat.com> 2.4.0-4
- Restore other skipped tests
* Thu Jan 13 2022 Major Hayden <major@redhat.com> 2.4.0-3
- Skip broken tests in rest streaming
* Thu Jan 13 2022 Major Hayden <major@redhat.com> 2.4.0-2
- Run all tests
* Wed Jan 12 2022 Major Hayden <major@redhat.com> 2.4.0-1
- Update to 2.4.0
* Thu Dec 16 2021 Major Hayden <major@redhat.com> 2.3.2-1
- Update to 2.3.2
* Wed Dec 15 2021 Major Hayden <major@redhat.com> 2.3.1-1
- Update to 2.3.1
* Wed Dec 08 2021 Major Hayden <major@redhat.com> 2.3.0-1
- Update to 2.3.0
* Wed Nov 03 2021 Major Hayden <major@redhat.com> 2.2.2-1
- Update to 2.2.2
* Thu Oct 28 2021 Major Hayden <major@redhat.com> 2.2.1-1
- Update to 2.2.1
* Tue Oct 26 2021 Major Hayden <major@mhtx.net> 2.2.0-1
- Update to 2.2.0
* Mon Oct 25 2021 Major Hayden <major@mhtx.net> 2.1.1-2
- Use python3-devel as BuildRequires
* Thu Oct 14 2021 Major Hayden <major@mhtx.net> 2.1.1-1
- Update to 2.1.0
* Wed Oct 06 2021 Major Hayden <major@mhtx.net> 2.1.0-1
- Update to 2.1.0
* Fri Sep 17 2021 Major Hayden <major@mhtx.net> 2.0.1-3
- Fix tests with PEP 420 workaround
* Thu Sep 09 2021 Major Hayden <major@mhtx.net> 2.0.1-2
- Move to rpmautospec
* Wed Sep 01 2021 Major Hayden <major@mhtx.net> 2.0.1-1
- Update to 2.0.1
* Mon Aug 23 2021 Major Hayden <major@mhtx.net> 2.0.0-2
- Add proto-plus dependency for tests
* Mon Aug 23 2021 Major Hayden <major@mhtx.net> 2.0.0-1
- Update to 2.0.0
* Tue Jul 27 2021 Major Hayden <major@mhtx.net> 1.31.1-2
- Use correct path for extracted sources
* Tue Jul 27 2021 Major Hayden <major@mhtx.net> 1.31.1-1
- Update to 1.31.1
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> 1.31.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jul 15 2021 Major Hayden <major@mhtx.net> 1.31.0-2
- Add grpc, grpcgcp, and grpcio-gcp extras packages
* Fri Jul 09 2021 Major Hayden <major@mhtx.net> 1.31.0-1
- Update to 1.31.0
* Tue Jun 15 2021 Major Hayden <major@mhtx.net> 1.30.0-3
- Get the right sources this time
* Tue Jun 15 2021 Major Hayden <major@mhtx.net> 1.30.0-2
- Include patch in new sources
* Tue Jun 15 2021 Major Hayden <major@mhtx.net> 1.30.0-1
- Update to v1.3.0
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> 1.29.0-2
- Rebuilt for Python 3.10
* Thu Jun 03 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.29.0-1
- Update to 1.29.0
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> 1.17.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Aug 17 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.17.0-2
- Temporarily disable tests
* Thu Aug 13 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.17.0-1
- Rebuild
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> 1.21.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> 1.21.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jun 19 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.21.0-1
- Update to 1.21.0
* Fri Jun 05 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.17.0-1
- Revert to 1.17.0 until grpc is updated
* Fri Jun 05 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> 1.19.0-1
- First import