## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 4;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

Name:           python-quart-trio
Version:        0.11.1
Release:        %autorelease
Summary:        A Quart extension to provide trio support

# SPDX
License:        MIT
URL:            https://github.com/pgjones/quart-trio
# PyPI source distributions lack tests, changelog, etc.; use the GitHub archive
Source:         %{url}/archive/%{version}/quart-trio-%{version}.tar.gz

# Downstream-only: patch out coverage analysis
# 
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
Patch:          0001-Downstream-only-patch-out-coverage-analysis.patch
# Avoid depending on exceptiongroup backport package on Python 3.11 and later
Patch:          %{url}/pull/16.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%global common_description %{expand:
Quart-Trio is an extension for Quart to support the Trio event loop. This is an
alternative to using the asyncio event loop present in the Python standard
library and supported by default in Quart.}

%description %{common_description}


%package -n python3-quart-trio
Summary:        %{summary}

%description -n python3-quart-trio %{common_description}


%prep
%autosetup -n quart-trio-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires -t


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files quart_trio


%check
%tox -- -- -v


%files -n python3-quart-trio -f %{pyproject_files}
%license LICENSE
%doc CHANGELOG.rst
%doc README.rst


%changelog
## START: Generated by rpmautospec
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 0.11.1-2
- Rebuilt for Python 3.13

* Wed Jun 05 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.11.1-1
- Initial package (close RHBZ#2262281)
## END: Generated by rpmautospec