## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without tests %global srcname google-cloud-bigquery-storage %global forgeurl https://github.com/googleapis/python-bigquery-storage Version: 2.24.0 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Python SDK for Google Cloud BigQuery Storage API License: Apache-2.0 URL: %forgeurl Source0: %forgesource # The base package is arched because extras metapackages requiring fastavro are # not available on 32-bit architectures # (https://bugzilla.redhat.com/show_bug.cgi?id=1943932). %ifnarch %{arm32} %{ix86} %global fastavro_arch 1 %endif # pyarrow is not packaged for i686. %ifnarch %{arm32} %{ix86} %global pyarrow_arch 1 %endif # Of the binary RPMs, only the conditionally-enabled extras metapackage # python3-google-cloud-bigquery-storage+fastavro is arched. # # Since there is no compiled code, there are no debugging symbols. %global debug_package %{nil} BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-asyncio) %endif %global _description %{expand: Python SDK for Google Cloud BigQuery Storage API} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} BuildArch: noarch %description -n python3-%{srcname} %{_description} # We would have to write out the extras metapackage definitions manually if # we wanted them to be noarch, since the base package is arched. %pyproject_extras_subpkg -n python3-%{srcname} pandas %if 0%{?fastavro_arch} # Note that this metapackage is arched because it is not available on 32-bit # architectures. %pyproject_extras_subpkg -n python3-%{srcname} fastavro %endif %if 0%{?pyarrow_arch} # Note that this metapackage is arched because it is not available on 32-bit # architectures. %pyproject_extras_subpkg -n python3-%{srcname} pyarrow %endif %prep %forgeautosetup -p1 # Allow a slightly older protobuf. sed -i 's/"protobuf.*",/"protobuf>=3.19.4",/' setup.py # 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 -x pandas,%{?pyarrow_arch:,pyarrow}%{?fastavro_arch:,fastavro},tests %build %pyproject_wheel %install %pyproject_install %pyproject_save_files google # Remove unnecessary scripts. rm -f %{buildroot}%{_bindir}/fixup*.py %check %if %{with tests} # NOTE(mhayden): Setting PYTHONUSERBASE as a hack for PEP 420 namespaces. # Thanks to churchyard for the fix. PYTHONUSERBASE=%{buildroot}%{_prefix} \ %pytest tests/unit %{?!fastavro_arch:--ignore=tests/unit/test_reader_v1.py} %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.rst SECURITY.md UPGRADING.md samples %changelog * Wed Dec 13 2023 Major Hayden - 2.24.0-2 - Skip import check, remove nspkg file * Tue Dec 12 2023 Packit - 2.24.0-1 - [packit] 2.24.0 upstream release - Resolves rhbz#2254263 * Tue Dec 05 2023 Major Hayden - 2.23.0-1 - Update to 2.23.0 rhbz#2252135 * Tue Oct 24 2023 Benjamin A. Beasley - 2.22.0-3 - Add exception case to support fastavro 1.8.4 (fix RHBZ#2245952) * Fri Jul 21 2023 Fedora Release Engineering - 2.22.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jul 06 2023 Major Hayden - 2.22.0-1 - Update to 2.22.0 rhbz#2220967 * Thu Jul 06 2023 Major Hayden - 2.21.0-1 - Update to 2.21.0 rhbz#2219898 * Thu Jun 29 2023 Python Maint - 2.20.0-2 - Rebuilt for Python 3.12 * Mon Jun 12 2023 Major Hayden - 2.20.0-1 - Update to 2.20.0 rhbz#2211533 * Mon Mar 27 2023 Major Hayden - 2.19.1-1 - Update to 2.19.1 rhbz#2182116 * Fri Mar 03 2023 Major Hayden - 2.19.0-1 - Update to 2.19.0 rhbz#2174495 * Tue Feb 21 2023 Major Hayden - 2.18.1-2 - Skip pyarrow on i686 * Tue Feb 21 2023 Major Hayden - 2.18.1-1 - Update to 2.18.1 * Fri Jan 20 2023 Fedora Release Engineering - 2.16.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Oct 19 2022 Major Hayden - 2.16.2-1 - Update to 2.16.2 rhbz#2131099 * Tue Sep 20 2022 Major Hayden - 2.16.0-1 - Update to 2.16.0 rhbz#2128109 * Tue Sep 06 2022 Major Hayden - 2.15.0-1 - Update to 2.15.0 rhbz#2124666 * Mon Aug 15 2022 Major Hayden - 2.14.2-1 - Update to 2.14.2 rhbz#2118339 * Fri Jul 22 2022 Fedora Release Engineering - 2.14.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jul 15 2022 fkolwa - 2.14.1-1 - Updatating package to version 2.14.1 rhbz#2106915 * Fri Jul 08 2022 Major Hayden - 2.14.0-1 - Update to 2.14.0 rhbz#2105406 * Tue Jun 28 2022 Python Maint - 2.13.2-2 - Rebuilt for Python 3.11 * Mon Jun 13 2022 Major Hayden - 2.13.2-1 - Update to 2.13.2 * Tue Apr 05 2022 Major Hayden - 2.13.1-1 - 🚀 Update to 2.13.1 * Thu Mar 10 2022 Major Hayden - 2.13.0-1 - Update to 2.13.0 * Wed Feb 23 2022 Major Hayden - 2.12.0-1 - Update to 2.12.0 * Fri Jan 21 2022 Fedora Release Engineering - 2.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jan 13 2022 Major Hayden - 2.11.0-1 - Update to 2.11.0 * Mon Nov 15 2021 Major Hayden - 2.10.1-1 - Update to 2.10.1 * Mon Nov 08 2021 Major Hayden - 2.10.0-1 - Update to 2.10.0 * Wed Oct 27 2021 Major Hayden - 2.9.1-2 - First package for version 2.9.1 * Wed Oct 27 2021 Major Hayden - 2.9.1-1 - Initial import (#2012986)