## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-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*}}%{!?-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.19.1 %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 %pyproject_check_import -e google.cloud.bigquery_storage_v1.types.annotations %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 %{python3_sitelib}/google_cloud_bigquery_storage-%{version}-py%{python3_version}-nspkg.pth %changelog * 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)