Blame python-azure-mgmt-redis.spec

111c5a9
# Enable tests everywhere except EPEL 9, where python-pytest-aiohttp is not backported.
111c5a9
%if 0%{?el9} || 0%{?centos} >= 9
111c5a9
%bcond_with    tests
111c5a9
%else
111c5a9
%bcond_without tests
111c5a9
%endif
708dfe9
25c9cb5
%global         srcname         azure-mgmt-redis
41d205b
41d205b
Name:           python-%{srcname}
5728df7
Version:        13.1.0
5728df7
Release:        %autorelease
41d205b
Summary:        Microsoft Azure Redis Cache Management Client Library for Python
41d205b
License:        MIT
41d205b
URL:            https://pypi.org/project/%{srcname}/
708dfe9
Source0:        %{pypi_source %{srcname} %{version} zip}
41d205b
41d205b
BuildArch:      noarch
41d205b
c9fb708
Epoch:          1
c9fb708
25c9cb5
BuildRequires:  python3-devel
41d205b
708dfe9
%if %{with tests}
708dfe9
BuildRequires:  python3dist(azure-devtools)
708dfe9
BuildRequires:  python3dist(azure-mgmt-keyvault)
708dfe9
BuildRequires:  python3dist(azure-mgmt-resource)
708dfe9
BuildRequires:  python3dist(azure-sdk-tools)
708dfe9
BuildRequires:  python3dist(pytest)
708dfe9
BuildRequires:  python3dist(pytest-aiohttp)
7b75a1c
BuildRequires:  python3dist(python-dotenv)
708dfe9
%endif
41d205b
41d205b
%global _description %{expand:
41d205b
Microsoft Azure Redis Cache Management Client Library for Python}
41d205b
41d205b
%description %{_description}
41d205b
41d205b
25c9cb5
%package -n python3-%{srcname}
41d205b
Summary:        %{summary}
0e795b1
25c9cb5
%description -n python3-%{srcname} %{_description}
41d205b
41d205b
41d205b
%prep
708dfe9
%autosetup -n %{srcname}-%{version}
41d205b
41d205b
41d205b
%generate_buildrequires
41d205b
%pyproject_buildrequires -r
41d205b
41d205b
41d205b
%build
41d205b
%pyproject_wheel
41d205b
41d205b
41d205b
%install
41d205b
%pyproject_install
41d205b
%pyproject_save_files azure
41d205b
41d205b
708dfe9
%check
0e795b1
%pyproject_check_import
0e795b1
0e795b1
%if %{with tests}
708dfe9
%pytest
708dfe9
%endif
708dfe9
708dfe9
708dfe9
# LICENSE missing. Added PR to fix:
708dfe9
# https://github.com/Azure/azure-sdk-for-python/pull/20182
41d205b
%files -n python3-%{srcname} -f %{pyproject_files}
708dfe9
%doc README.md CHANGELOG.md
41d205b
41d205b
41d205b
%changelog
5728df7
%autochangelog