## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## 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 %bcond tests 1 Name: python-aiolimiter Version: 1.2.1 Release: %autorelease Summary: An efficient implementation of a rate limiter for asyncio. License: MIT URL: https://github.com/mjpieters/aiolimiter Source: %{url}/archive/v%{version}/aiolimiter-%{version}.tar.gz # https://github.com/mjpieters/aiolimiter/pull/312 Patch: 0001-tests-Prefer-tomllib-where-available.patch BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3-pytest BuildRequires: python3-pytest-asyncio BuildRequires: python3-pytest-cov BuildRequires: python3-toml %if 0%{?rhel} < 10 BuildRequires: python3-toml %endif # rhel9 %endif # tests %global _description %{expand: An efficient implementation of a rate limiter for asyncio. This project implements the Leaky bucket algorithm, giving you precise control over the rate a code section can be entered.} %description %_description %package -n python3-aiolimiter Summary: %{summary} %description -n python3-aiolimiter %_description %prep %autosetup -p1 -n aiolimiter-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files aiolimiter %check %pyproject_check_import %if %{with tests} %pytest tests %endif %files -n python3-aiolimiter -f %{pyproject_files} %license LICENSE.txt %doc CHANGELOG.md %doc README.md %changelog ## START: Generated by rpmautospec * Mon May 12 2025 Stephen Gallagher - 1.2.1-4 - Explicitly handle documentation in %%files section * Mon May 12 2025 Stephen Gallagher - 1.2.1-3 - Add patch to prefer tomllib over python3-toml * Mon May 12 2025 Stephen Gallagher - 1.2.1-2 - Enable tests * Mon May 12 2025 Stephen Gallagher - 1.2.1-1 - Initial packaging ## END: Generated by rpmautospec