Blame python-google-cloud-access-approval.spec

6444da7
# tests are enabled by default
6444da7
%bcond_without tests
6444da7
6444da7
%global         srcname     google-cloud-access-approval
6444da7
%global         forgeurl    https://github.com/googleapis/python-access-approval
da74eff
Version:        1.4.1
6444da7
%global         tag         v%{version}
6444da7
%forgemeta
6444da7
6444da7
Name:           python-%{srcname}
6444da7
Release:        %autorelease
6444da7
Summary:        Python Client for Google Cloud Access Approval API
6444da7
6444da7
License:        ASL 2.0
6444da7
URL:            %forgeurl
6444da7
Source0:        %forgesource
6444da7
Patch0:         python-google-cloud-access-approval-mock.patch
6444da7
6444da7
BuildArch:      noarch
6444da7
6444da7
BuildRequires:  python3-devel
6444da7
6444da7
%if %{with tests}
6444da7
BuildRequires:  python3dist(pytest)
6444da7
BuildRequires:  python3dist(pytest-asyncio)
6444da7
%endif
6444da7
6444da7
%global _description %{expand:
6444da7
The Access Approval API is an API for controlling access to data by Google
6444da7
personnel.}
6444da7
6444da7
%description %{_description}
6444da7
6444da7
6444da7
%package -n python3-%{srcname}
6444da7
Summary:        %{summary}
6444da7
6444da7
%description -n python3-%{srcname} %{_description}
6444da7
6444da7
6444da7
%prep
6444da7
%forgeautosetup -p1
6444da7
6444da7
6444da7
%generate_buildrequires
6444da7
%pyproject_buildrequires -r
6444da7
6444da7
6444da7
%build
6444da7
%pyproject_wheel
6444da7
6444da7
6444da7
%install
6444da7
%pyproject_install
6444da7
%pyproject_save_files google
6444da7
6444da7
# Remove unneeded executable.
6444da7
rm -f %{buildroot}%{_bindir}/fixup_accessapproval_v1_keywords.py
6444da7
6444da7
6444da7
%if %{with tests}
6444da7
%check
6444da7
# Work around an usual pytest/PEP 420 issue where pytest can't import the
6444da7
# installed module. Thanks to mhroncok for the help!
6444da7
mv google{,_}
6444da7
%pytest --disable-warnings tests/unit
6444da7
mv google{_,}
6444da7
%endif
6444da7
6444da7
6444da7
6444da7
%files -n python3-%{srcname} -f %{pyproject_files}
6444da7
%license LICENSE
6444da7
%doc README.rst CHANGELOG.md
6444da7
%{python3_sitelib}/google_cloud_access_approval-%{version}-py%{python3_version}-nspkg.pth
6444da7
6444da7
6444da7
%changelog
6444da7
%autochangelog