## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    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
Version:        0.20.0
Release:        %autorelease
Summary:        A Python ASGI web microframework with the same API as Flask

# SPDX
License:        MIT
URL:            https://github.com/pallets/quart
# PyPI source distributions lack tests, changelog, etc.; use the GitHub archive
Source:         %{url}/archive/%{version}/quart-%{version}.tar.gz
# Man pages hand-written for Fedora in groff_man(7) format based on --help
Source10:       quart.1
Source11:       quart-routes.1
Source12:       quart-run.1
Source13:       quart-shell.1

# Downstream-only: patch out coverage analysis
# 
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
#
# (This also patches out pytest-sugar because it’s unnecessary.)
Patch:          0001-Downstream-only-patch-out-coverage-analysis.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%global common_description %{expand:
Quart is an async Python web microframework. Using Quart you can,

  * render and serve HTML templates,
  * write (RESTful) JSON APIs,
  * serve WebSockets,
  * stream request and response data,
  * do pretty much anything over the HTTP or WebSocket protocols.}

%description %{common_description}


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

%description -n python3-quart %{common_description}


%pyproject_extras_subpkg -n python3-quart dotenv


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


%generate_buildrequires
%pyproject_buildrequires -x dotenv requirements/tests.in


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files quart

install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 \
    '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' '%{SOURCE13}'


%check
%pytest -v


%files -n python3-quart -f %{pyproject_files}
%license LICENSE.txt
%doc CHANGES.md
%doc README.md

%{_bindir}/quart
%{_mandir}/man1/quart{,-*}.1*


%changelog
## START: Generated by rpmautospec
* Mon Dec 23 2024 Packit <hello@packit.dev> - 0.20.0-1
- Update to 0.20.0 upstream release
- Resolves: rhbz#2333850

* Thu Nov 14 2024 Packit <hello@packit.dev> - 0.19.9-1
- Update to 0.19.9 upstream release
- Resolves: rhbz#2326330

* Fri Oct 25 2024 Packit <hello@packit.dev> - 0.19.8-1
- Update to 0.19.8 upstream release
- Resolves: rhbz#2321827

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

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

* Tue Jun 04 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.19.6-1
- Initial package (close RHBZ#2262268)
## END: Generated by rpmautospec