|
 |
b15af7f |
# tests are enabled by default
|
|
 |
b15af7f |
%bcond_without tests
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%global srcname google-cloud-api-gateway
|
|
 |
b15af7f |
%global forgeurl https://github.com/googleapis/python-api-gateway
|
|
 |
cd31087 |
Version: 1.2.1
|
|
 |
b15af7f |
%global tag v%{version}
|
|
 |
b15af7f |
%forgemeta
|
|
 |
b15af7f |
|
|
 |
b15af7f |
Name: python-%{srcname}
|
|
 |
b15af7f |
Release: %autorelease
|
|
 |
b15af7f |
Summary: Python Client for Google Cloud API Gateway
|
|
 |
b15af7f |
|
|
 |
b15af7f |
License: ASL 2.0
|
|
 |
b15af7f |
URL: %forgeurl
|
|
 |
b15af7f |
Source0: %forgesource
|
|
 |
b15af7f |
Patch0: python-google-cloud-api-gateway-mock.patch
|
|
 |
b15af7f |
|
|
 |
b15af7f |
BuildArch: noarch
|
|
 |
b15af7f |
|
|
 |
1095205 |
BuildRequires: python3-devel
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%if %{with tests}
|
|
 |
b15af7f |
BuildRequires: python3dist(pytest)
|
|
 |
b15af7f |
BuildRequires: python3dist(pytest-asyncio)
|
|
 |
b15af7f |
%endif
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%global _description %{expand:
|
|
 |
b15af7f |
API Gateway allows you to create, secure, and monitor APIs for Google Cloud
|
|
 |
b15af7f |
serverless back ends, including Cloud Functions, Cloud Run, and App Engine.
|
|
 |
b15af7f |
Built on Envoy, API Gateway gives you high performance, scalability, and the
|
|
 |
b15af7f |
freedom to focus on building great apps.}
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%description %{_description}
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%package -n python3-%{srcname}
|
|
 |
b15af7f |
Summary: %{summary}
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%description -n python3-%{srcname} %{_description}
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%prep
|
|
 |
b15af7f |
%forgeautosetup -p1
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%generate_buildrequires
|
|
 |
b15af7f |
%pyproject_buildrequires -r
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%build
|
|
 |
b15af7f |
%pyproject_wheel
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%install
|
|
 |
b15af7f |
%pyproject_install
|
|
 |
b15af7f |
%pyproject_save_files google
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%if %{with tests}
|
|
 |
b15af7f |
%check
|
|
 |
b15af7f |
# Work around an usual pytest/PEP 420 issue where pytest can't import the
|
|
 |
b15af7f |
# installed module. Thanks to mhroncok for the help!
|
|
 |
b15af7f |
mv google{,_}
|
|
 |
b15af7f |
%pytest --disable-warnings tests/unit
|
|
 |
b15af7f |
mv google{_,}
|
|
 |
b15af7f |
%endif
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%files -n python3-%{srcname} -f %{pyproject_files}
|
|
 |
b15af7f |
%license LICENSE
|
|
 |
b15af7f |
%doc README.rst CHANGELOG.md
|
|
 |
b15af7f |
%{python3_sitelib}/google_cloud_api_gateway-%{version}-py%{python3_version}-nspkg.pth
|
|
 |
b15af7f |
|
|
 |
b15af7f |
|
|
 |
b15af7f |
%changelog
|
|
 |
b15af7f |
%autochangelog
|