## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 # NOTE(mhayden): Temporarily disabling tests due to import errors. %bcond_with tests # opentelemetry-instrumentation is not yet packaged. %bcond_with opentelemetry-instrumentation # db-dtypes is not yet packaged %bcond_with db-dtypes %global srcname google-cloud-bigquery %global forgeurl https://github.com/googleapis/python-bigquery Version: 3.4.0 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Python Client for Google BigQuery License: ASL 2.0 URL: %forgeurl Source0: %forgesource BuildArch: noarch ExcludeArch: %{ix86} BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(freezegun) BuildRequires: python3dist(google-cloud-testutils) BuildRequires: python3dist(ipython) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-asyncio) %endif %global _description %{expand: Python Client for Google BigQuery} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} # Extra packages %pyproject_extras_subpkg -n python3-%{srcname} bqstorage %if %{with db-dtypes} %pyproject_extras_subpkg -n python3-%{srcname} pandas %endif %if %{with opentelemetry-instrumentation} %pyproject_extras_subpkg -n python3-%{srcname} opentelemetry %endif %pyproject_extras_subpkg -n python3-%{srcname} geopandas %pyproject_extras_subpkg -n python3-%{srcname} ipython %pyproject_extras_subpkg -n python3-%{srcname} tqdm %prep %forgeautosetup # Allow a slightly older protobuf. sed -i 's/"protobuf.*",/"protobuf>=3.19.4",/' setup.py # Remove the upper bound on the version of packaging sed -r -i "s/(packaging\\b.*)(, [[:blank:]]*<[^'\"]*)/\1/" setup.py # Remove the upper bound on the version of pyarrow. sed -r -i "s/(pyarrow\\b.*)(, [[:blank:]]*<[^'\"]*)/\1/" 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/' # Remove Python version limitation. sed -i '/python_requires/d' setup.py %generate_buildrequires %pyproject_buildrequires -x bqstorage,%{?with_db-dtypes:pandas,geopandas,}%{?with_opentelemetry-instrumentation:opentelemetry,}ipython,tqdm %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! mv google{,_} %pytest tests/unit \ -k "not test_to_query_parameters_w_list \ and not test_consume_unexpected_eol" mv google{_,} %endif %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE %doc README.rst CHANGELOG.md %{python3_sitelib}/google_cloud_bigquery-%{version}-py%{python3_version}-nspkg.pth %changelog * Tue Feb 14 2023 Major Hayden 3.4.0-5 - Remove upper bound for pyarrow * Fri Feb 10 2023 Major Hayden 3.4.0-4 - Fix FTI bug rhbz#2168137 * Thu Feb 09 2023 Benjamin A. Beasley 3.4.0-3 - Remove packaging version upper-bound (fix RHBZ#2168137) * Fri Jan 20 2023 Fedora Release Engineering 3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Dec 07 2022 Major Hayden 3.4.0-1 - Update to 3.4.0 rhbz#2144021 * Mon Nov 07 2022 fkolwa 3.3.6-1 - Update to 3.3.6 rhbz#2140167 * Wed Oct 19 2022 Major Hayden 3.3.5-1 - Update to 3.3.5 rhbz#2133575 * Fri Sep 30 2022 fkolwa 3.3.3-1 - Update to 3.3.3 rhbz#2131079 * Fri Sep 16 2022 Benjamin A. Beasley 3.3.2-4 - Generate BR’s for extras * Fri Sep 16 2022 Benjamin A. Beasley 3.3.2-3 - Enable pyarrow support * Fri Sep 16 2022 Benjamin A. Beasley 3.3.2-2 - Add ExcludeArch on i686 * Fri Aug 26 2022 Major Hayden 3.3.2-1 - Update to 3.3.2 rhbz#2116850 * Fri Jul 22 2022 Fedora Release Engineering 2.34.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 29 2022 Major Hayden 2.34.4-2 - Enable some extras packages * Wed Jun 29 2022 Major Hayden 2.34.4-1 - Update to 2.34.4, fix FTBFS rhbz#2098932 * Tue Jun 28 2022 Python Maint 2.34.3-2 - Rebuilt for Python 3.11 * Fri May 06 2022 Major Hayden 2.34.3-1 - Update to 2.34.3 * Fri Jan 21 2022 Fedora Release Engineering 2.30.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Nov 08 2021 Major Hayden 2.30.1-1 - Update to 2.30.1 * Thu Nov 04 2021 Major Hayden 2.30.0-1 - Update to 2.30.0 * Wed Oct 27 2021 Major Hayden 2.29.0-1 - Update to 2.29.0 * Thu Oct 07 2021 Major Hayden 2.28.1-1 - Update to 2.28.1 * Tue Oct 05 2021 Major Hayden 2.28.0-1 - Initial import (#2010752)