## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 %global pypi_name surt %global forgeurl https://github.com/internetarchive/surt # Using a commit here as the release isn't tagged # https://github.com/internetarchive/surt/issues/26 %global commit 6934c321b3e2f66af9c001d882475949f00570c5 %forgemeta %global common_description %{expand: SURT is a Python package to implement a Sort-friendly URI Reordering Transform, which is a transformation applied to URIs which makes their left-to-right representation better match the natural hierarchy of domain names.} Name: python-%{pypi_name} Version: 0.3.1 Release: %autorelease Summary: Sort-friendly URI Reordering Transform (SURT) python package License: AGPLv3+ URL: %{forgeurl} # PyPI doesn't include tests so use the GitHub tarball instead Source0: %{forgesource} # PR#27: Remove unnecessary shebangs Patch0: %{forgeurl}/pull/27.patch BuildArch: noarch BuildRequires: python3-devel %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %prep %forgeautosetup -p1 %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files surt %check %tox %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst %changelog * Fri Jan 20 2023 Fedora Release Engineering 0.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 0.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint 0.3.1-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 09 2021 Davide Cavalca 0.3.1-1 - Initial import; Fixes: RHBZ#1990222