Blame python-azure-servicebus.spec

55a940d
# Enable tests by default.
1d4c8ba
%bcond_without  tests
55a940d
55a940d
%global         srcname     azure-servicebus
55a940d
55a940d
Name:           python-%{srcname}
55a940d
Version:        7.6.1
55a940d
Release:        %autorelease
55a940d
Summary:        Microsoft Azure Service Bus Client Library for Python
55a940d
License:        MIT
55a940d
URL:            https://pypi.org/project/%{srcname}/
55a940d
Source0:        %{pypi_source %{srcname} %{version} zip}
55a940d
55a940d
BuildArch:      noarch
55a940d
55a940d
55a940d
BuildRequires:  python3-devel
55a940d
55a940d
%if %{with tests}
55a940d
BuildRequires:  python3dist(aiohttp)
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
55a940d
%autosetup -n %{srcname}-%{version}
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}
55a940d
# Many tests try to connect to various Azure APIs during the test and that won't work
55a940d
# during the package build. These exclusions remove those tests while keeping as many of
55a940d
# the non-network tests as possible.
1d4c8ba
%pytest -m "not (live_test_only or liveTest)" \
55a940d
    --ignore=tests/async_tests --ignore=tests/mgmt_tests
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