## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## 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 %global srcname single-version %global forgeurl https://github.com/hongquan/single-version Version: 1.6.0 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Utility to define version string License: MIT URL: %{forgeurl} Source: %{forgesource} BuildRequires: python3-devel BuildRequires: python3-pytest BuildArch: noarch %global _description %{expand: Utility to let you have a single source version in your code base. This utility argets modern Python projects which have layout generated by Poetry, with a pyproject.roml file in place of setup.py. With this layout, the project initially has two places to maintain the version string: on e in pyproject.toml and one in some *.py file (normally __init__.py). This duplicity often leads to inconsistenct when you the author forget to update both. single-version was born to solve that headache circumstance. By convention, it chooses the pyproject.toml file as original source of version string.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %forgeautosetup %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files single_version %check %pytest %files -n python3-%{srcname} -f %{pyproject_files} %changelog ## START: Generated by rpmautospec * Mon Oct 21 2024 John Doe - 1.6.0-1 - Uncommitted changes ## END: Generated by rpmautospec