## 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 # tests are enabled by default %bcond_without 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.3.2 %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 # 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 * 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)