## 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 pypi_name donfig Name: python-%{pypi_name} Version: 0.8.1.post1 Release: %{autorelease} Summary: Python package for configuring a python package %global forgeurl https://github.com/pytroll/donfig %global tag v%{version} %forgemeta License: MIT URL: %forgeurl Source: %forgesource BuildArch: noarch BuildRequires: git-core BuildRequires: python3-devel %global _description %{expand: Donfig is a python library meant to make configuration easier for other python packages. Donfig can be configured programmatically, by environment variables, or from YAML files in standard locations. The below examples show the basics of using donfig. For more details see the official documentation: https://donfig.readthedocs.io/en/latest/} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %forgeautosetup -p1 -S git # Drop version pin from versioneer sed -r -i 's/(versioneer\[toml\]).*"/\1"/' pyproject.toml # Remove spurious shebangs find donfig/ -name '*.py' -exec sed -r -i '/env python/d' '{}' \; # Do the versioneer dance. Summon the snake charmers and have them bless # this package with a valid and correct version. 🐍 🪄 git add --all git commit -m "I hate snakes!" git tag v%{version} %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.rst CHANGELOG.md AUTHORS.md %changelog ## START: Generated by rpmautospec * Sat Oct 26 2024 Sandro - 0.8.1.post1-1 - Initial package ## END: Generated by rpmautospec