Blame python-azure-mgmt-subscription.spec

2a0c15d
# Upstream has some basic scaffolding for running tests, but no tests are
2a0c15d
# included yet in the 3.0.0 release. 😢
2a0c15d
%bcond_with     tests
2a0c15d
2a0c15d
%global         srcname     azure-mgmt-subscription
2a0c15d
2a0c15d
Name:           python-%{srcname}
2a0c15d
Version:        3.0.0
2a0c15d
Release:        %autorelease
2a0c15d
Summary:        Microsoft Azure Subscription Management Client Library for Python
2a0c15d
License:        MIT
2a0c15d
URL:            https://pypi.org/project/%{srcname}/
2a0c15d
Source0:        %{pypi_source %{srcname} %{version} zip}
2a0c15d
2a0c15d
Epoch:          1
2a0c15d
2a0c15d
BuildArch:      noarch
2a0c15d
2a0c15d
BuildRequires:  python3-devel
2a0c15d
2a0c15d
%if %{with tests}
2a0c15d
BuildRequires:  python3dist(azure-devtools)
2a0c15d
BuildRequires:  python3dist(azure-mgmt-keyvault)
2a0c15d
BuildRequires:  python3dist(azure-mgmt-resource)
2a0c15d
BuildRequires:  python3dist(azure-sdk-tools)
2a0c15d
BuildRequires:  python3dist(pytest)
2a0c15d
BuildRequires:  python3dist(pytest-aiohttp)
2a0c15d
BuildRequires:  python3dist(python-dotenv)
2a0c15d
%endif
2a0c15d
2a0c15d
%global _description %{expand:
2a0c15d
Microsoft Azure Subscription Management Client Library for Python}
2a0c15d
2a0c15d
%description %{_description}
2a0c15d
2a0c15d
2a0c15d
%package -n python3-%{srcname}
2a0c15d
Summary:        %{summary}
2a0c15d
2a0c15d
%description -n python3-%{srcname} %{_description}
2a0c15d
2a0c15d
2a0c15d
%prep
2a0c15d
%autosetup -n %{srcname}-%{version}
2a0c15d
2a0c15d
2a0c15d
%generate_buildrequires
2a0c15d
%pyproject_buildrequires
2a0c15d
2a0c15d
2a0c15d
%build
2a0c15d
%pyproject_wheel
2a0c15d
2a0c15d
2a0c15d
%install
2a0c15d
%pyproject_install
2a0c15d
%pyproject_save_files azure
2a0c15d
2a0c15d
2a0c15d
%check
2a0c15d
%pyproject_check_import
2a0c15d
2a0c15d
%if %{with tests}
2a0c15d
%pytest
2a0c15d
%endif
2a0c15d
2a0c15d
2a0c15d
%files -n python3-%{srcname} -f %{pyproject_files}
2a0c15d
%doc CHANGELOG.md README.md
2a0c15d
2a0c15d
2a0c15d
%changelog
2a0c15d
%autochangelog