## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 1; 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 3.14.0. F35's protobuf is too old. # tests are enabled by default %bcond_without tests %global srcname google-cloud-spanner %global forgeurl https://github.com/googleapis/python-spanner Version: 3.20.0 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Python Client for Google Cloud Spanner License: ASL 2.0 URL: %forgeurl Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-asyncio) %endif %global _description %{expand: Python Client for Google Cloud Spanner} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup -p1 # Replace mock imports with unittest.mock. grep -rl "^[[:space:]]*import mock" tests | \ xargs sed -i -E 's/^([[:space:]]*)import mock/\1from unittest import mock/' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files google %check %pyproject_check_import %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! # NOTE(mhayden): Skip the cursor tests since most of them require credentials # which are not included in the source repo. mv google{,_} %pytest --ignore=tests/unit/spanner_dbapi/test_cursor.py tests/unit mv google{_,} %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst CHANGELOG.md %{python3_sitelib}/google_cloud_spanner-%{version}-py%{python3_version}-nspkg.pth %changelog * Wed Sep 14 2022 fkolwa 3.20.0-1 - Update to 3.20.0 rhbz#2126542 * Wed Aug 17 2022 Major Hayden 3.19.0-1 - Update to 3.19.0 rhbz#2119148 * Mon Aug 15 2022 Major Hayden 3.18.0-1 - Update to 3.18.0 rhbz#2118363 * Fri Jul 22 2022 Fedora Release Engineering 3.16.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 11 2022 Major Hayden 3.16.0-1 - Update to 3.16.0 rhbz#2106148 * Tue Jun 28 2022 Major Hayden 3.15.1-2 - Update to 3.15.1 * Tue Jun 21 2022 Major Hayden 3.15.1-1 - Update to 3.15.1 * Mon Jun 13 2022 Major Hayden 3.14.1-1 - Update to 3.14.1 * Wed Apr 20 2022 Major Hayden 3.14.0-1 - 🚀 Update to 3.14.0 * Mon Feb 07 2022 Major Hayden 3.13.0-1 - Update to 3.13.0 * Fri Jan 21 2022 Fedora Release Engineering 3.12.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jan 06 2022 Major Hayden 3.12.1-1 - Update to 3.12.1 * Fri Dec 03 2021 Major Hayden 3.12.0-1 - 🚀 Update to 3.12.0 * Tue Oct 05 2021 Major Hayden 3.11.0-1 - Initial import (#2010383)