Blame python-google-cloud-bigquery.spec

257a088
# tests are enabled by default
257a088
%bcond_without tests
257a088
257a088
%global         srcname     google-cloud-bigquery
257a088
%global         forgeurl    https://github.com/googleapis/python-bigquery
42b219d
Version:        2.34.3
257a088
%global         tag         v%{version}
257a088
%forgemeta
257a088
257a088
Name:           python-%{srcname}
257a088
Release:        %autorelease
257a088
Summary:        Python Client for Google BigQuery
257a088
257a088
License:        ASL 2.0
257a088
URL:            %forgeurl
257a088
Source0:        %forgesource
547147e
Patch0:         python-google-cloud-bigquery-mock.patch
257a088
257a088
BuildArch:      noarch
257a088
257a088
BuildRequires:  pyproject-rpm-macros
257a088
257a088
%if %{with tests}
257a088
BuildRequires:  python3dist(freezegun)
257a088
BuildRequires:  python3dist(google-cloud-testutils)
257a088
BuildRequires:  python3dist(pytest)
257a088
BuildRequires:  python3dist(pytest-asyncio)
257a088
%endif
257a088
257a088
%global _description %{expand:
257a088
Python Client for Google BigQuery}
257a088
257a088
%description %{_description}
257a088
257a088
257a088
%package -n python3-%{srcname}
257a088
Summary:        %{summary}
257a088
257a088
%description -n python3-%{srcname} %{_description}
257a088
257a088
257a088
%prep
257a088
%forgeautosetup -p1
257a088
257a088
257a088
%generate_buildrequires
257a088
%pyproject_buildrequires -r
257a088
257a088
257a088
%build
257a088
%pyproject_wheel
257a088
257a088
257a088
%install
257a088
%pyproject_install
257a088
%pyproject_save_files google
257a088
257a088
257a088
%if %{with tests}
257a088
%check
257a088
# Work around an unusual pytest/PEP 420 issue where pytest can't import the
257a088
# installed module. Thanks to mhroncok for the help!
257a088
mv google{,_}
42b219d
%pytest --disable-warnings tests/unit
257a088
mv google{_,}
257a088
%endif
257a088
257a088
257a088
%files -n python3-%{srcname} -f %{pyproject_files}
257a088
%license LICENSE
257a088
%doc README.rst CHANGELOG.md
257a088
%{python3_sitelib}/google_cloud_bigquery-%{version}-py%{python3_version}-nspkg.pth
257a088
257a088
257a088
%changelog
257a088
%autochangelog