Blame python-google-cloud-asset.spec

08934a5
# tests are enabled by default
08934a5
%bcond_without tests
08934a5
08934a5
%global         srcname     google-cloud-asset
08934a5
%global         forgeurl    https://github.com/googleapis/python-asset
ba9e235
Version:        3.9.0
08934a5
%global         tag         v%{version}
08934a5
%forgemeta
08934a5
08934a5
Name:           python-%{srcname}
08934a5
Release:        %autorelease
08934a5
Summary:        Python Client for Google Cloud App Engine Admin
08934a5
08934a5
License:        ASL 2.0
08934a5
URL:            %forgeurl
08934a5
Source0:        %forgesource
ba9e235
# Proposed a unittest.mock fix upstream:
ba9e235
# https://github.com/googleapis/python-asset/pull/428
ba9e235
Patch0:         https://github.com/googleapis/python-asset/pull/428.patch
08934a5
08934a5
BuildArch:      noarch
08934a5
22b8709
BuildRequires:  python3-devel
08934a5
08934a5
%if %{with tests}
08934a5
BuildRequires:  python3dist(pytest)
08934a5
BuildRequires:  python3dist(pytest-asyncio)
08934a5
%endif
08934a5
08934a5
%global _description %{expand:
08934a5
App Engine Admin allows you to manage your App Engine applications.}
08934a5
08934a5
%description %{_description}
08934a5
08934a5
08934a5
%package -n python3-%{srcname}
08934a5
Summary:        %{summary}
08934a5
08934a5
%description -n python3-%{srcname} %{_description}
08934a5
08934a5
08934a5
%prep
08934a5
%forgeautosetup -p1
08934a5
08934a5
08934a5
%generate_buildrequires
08934a5
%pyproject_buildrequires -r
08934a5
08934a5
08934a5
%build
08934a5
%pyproject_wheel
08934a5
08934a5
08934a5
%install
08934a5
%pyproject_install
08934a5
%pyproject_save_files google
08934a5
08934a5
# Remove extra scripts.
08934a5
rm -f %{buildroot}%{_bindir}/fixup_asset*.py
08934a5
08934a5
08934a5
%if %{with tests}
08934a5
%check
08934a5
# Work around an unusual pytest/PEP 420 issue where pytest can't import the
08934a5
# installed module. Thanks to mhroncok for the help!
08934a5
mv google{,_}
08934a5
%pytest --disable-warnings tests/unit
08934a5
mv google{_,}
08934a5
%endif
08934a5
08934a5
08934a5
%files -n python3-%{srcname} -f %{pyproject_files}
08934a5
%license LICENSE
08934a5
%doc README.rst CHANGELOG.md
08934a5
%{python3_sitelib}/google_cloud_asset-%{version}-py%{python3_version}-nspkg.pth
08934a5
08934a5
08934a5
%changelog
08934a5
%autochangelog