Blame python-azure-servicebus.spec

97a6dfc
# All of the tests require either docker, network access, or both.
97a6dfc
%bcond_with  tests
55a940d
97a6dfc
%global         reponame    azure-sdk-for-python
55a940d
%global         srcname     azure-servicebus
55a940d
55a940d
Name:           python-%{srcname}
97a6dfc
Version:        7.11.1
55a940d
Release:        %autorelease
55a940d
Summary:        Microsoft Azure Service Bus Client Library for Python
55a940d
License:        MIT
97a6dfc
URL:            https://github.com/Azure/azure-sdk-for-python
97a6dfc
Source0:        %{url}/archive/%{srcname}_%{version}/%{srcname}-%{version}.tar.gz
55a940d
55a940d
BuildArch:      noarch
55a940d
55a940d
55a940d
BuildRequires:  python3-devel
55a940d
97a6dfc
# For import checks.
55a940d
BuildRequires:  python3dist(aiohttp)
97a6dfc
BuildRequires:  python3dist(certifi)
97a6dfc
97a6dfc
%if %{with tests}
55a940d
BuildRequires:  python3dist(azure-devtools)
55a940d
BuildRequires:  python3dist(azure-identity)
55a940d
BuildRequires:  python3dist(azure-mgmt-keyvault)
55a940d
BuildRequires:  python3dist(azure-mgmt-resource)
55a940d
BuildRequires:  python3dist(azure-mgmt-servicebus)
55a940d
BuildRequires:  python3dist(azure-sdk-tools)
55a940d
BuildRequires:  python3dist(pytest)
55a940d
BuildRequires:  python3dist(python-dotenv)
55a940d
%endif
55a940d
55a940d
%global _description %{expand:
55a940d
Microsoft Azure Service Bus Client Library for Python}
55a940d
55a940d
%description %{_description}
55a940d
55a940d
55a940d
%package -n python3-%{srcname}
55a940d
Summary:        %{summary}
1d4c8ba
55a940d
%description -n python3-%{srcname} %{_description}
55a940d
55a940d
55a940d
%prep
97a6dfc
# Upstream buries the package into a subdirectory. 😭
97a6dfc
%setup -c -T
97a6dfc
tar xzf %{SOURCE0} --strip-components=4 \
97a6dfc
    %{reponame}-%{srcname}_%{version}/sdk/servicebus/%{srcname}
97a6dfc
ls -alR
55a940d
55a940d
55a940d
%generate_buildrequires
1d4c8ba
%pyproject_buildrequires
55a940d
55a940d
55a940d
%build
55a940d
%pyproject_wheel
55a940d
55a940d
55a940d
%install
55a940d
%pyproject_install
55a940d
%pyproject_save_files azure
55a940d
55a940d
55a940d
%check
1d4c8ba
%pyproject_check_import
1d4c8ba
1d4c8ba
%if %{with tests}
97a6dfc
%pytest
55a940d
%endif
55a940d
55a940d
55a940d
%files -n python3-%{srcname} -f %{pyproject_files}
55a940d
%doc CHANGELOG.md migration_guide.md README.md samples
55a940d
55a940d
55a940d
%changelog
55a940d
%autochangelog