Blame python-google-cloud-bigtable.spec

0d05764
# tests are enabled by default
0d05764
%bcond_without tests
0d05764
0d05764
%global         srcname     google-cloud-bigtable
0d05764
%global         forgeurl    https://github.com/googleapis/python-bigtable
d5c8c2d
Version:        2.9.0
0d05764
%global         tag         v%{version}
0d05764
%forgemeta
0d05764
0d05764
Name:           python-%{srcname}
0d05764
Release:        %autorelease
0d05764
Summary:        Python Client for Google Cloud Bigtable API
0d05764
0d05764
License:        ASL 2.0
0d05764
URL:            %forgeurl
0d05764
Source0:        %forgesource
0d05764
Patch0:         python-google-cloud-bigtable-mock.patch
0d05764
0d05764
BuildArch:      noarch
0d05764
c76c89f
BuildRequires:  python3-devel
0d05764
0d05764
%if %{with tests}
0d05764
BuildRequires:  python3dist(pytest)
0d05764
BuildRequires:  python3dist(pytest-asyncio)
0d05764
%endif
0d05764
0d05764
%global _description %{expand:
0d05764
Google Cloud Bigtable is Google's NoSQL Big Data database service.}
0d05764
0d05764
%description %{_description}
0d05764
0d05764
0d05764
%package -n python3-%{srcname}
0d05764
Summary:        %{summary}
0d05764
0d05764
%description -n python3-%{srcname} %{_description}
0d05764
0d05764
0d05764
%prep
0d05764
%forgeautosetup -p1
0d05764
f8aa0d2
0d05764
%generate_buildrequires
0d05764
%pyproject_buildrequires -r
0d05764
0d05764
0d05764
%build
0d05764
%pyproject_wheel
0d05764
0d05764
0d05764
%install
0d05764
%pyproject_install
0d05764
%pyproject_save_files google
0d05764
0d05764
# Remove unnecessary scripts.
0d05764
rm -f %{buildroot}%{_bindir}/fixup_bigtable*.py
0d05764
0d05764
0d05764
%if %{with tests}
0d05764
%check
0d05764
# Work around an unusual pytest/PEP 420 issue where pytest can't import the
0d05764
# installed module. Thanks to mhroncok for the help!
0d05764
mv google{,_}
0d05764
%pytest --disable-warnings tests/unit
0d05764
mv google{_,}
0d05764
%endif
0d05764
0d05764
0d05764
%files -n python3-%{srcname} -f %{pyproject_files}
0d05764
%license LICENSE
0d05764
%doc README.rst CHANGELOG.md
0d05764
%{python3_sitelib}/google_cloud_bigtable-%{version}-py%{python3_version}-nspkg.pth
0d05764
0d05764
0d05764
%changelog
0d05764
%autochangelog