## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease %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-coolname Version: 4.1.0 Release: %autorelease Summary: Random Name and Slug Generator License: BSD-2-Clause URL: https://github.com/alexanderlukanin13/coolname # The pypi package doesn't package the tests Source: %{url}/archive/refs/tags/%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: pyproject-rpm-macros %global _description %{expand: A pure Python random name generator} %description %_description %package -n python3-coolname Summary: %{summary} %description -n python3-coolname %_description %prep %autosetup -p1 -n coolname-%{version} # Patch the test to append to PYTHONPATH instead of overwriting it sed -i "s/env\['PYTHONPATH'\] = PROJECT_DIR/env['PYTHONPATH'] = os.pathsep.join([PROJECT_DIR, os.environ.get('PYTHONPATH', '')])/" tests/test_coolname_env.py # Relax the setuptools version requirement sed -i 's/setuptools==[0-9.]*/setuptools>=80/' pyproject.toml %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_install %pyproject_save_files coolname %check %pytest %files -n python3-coolname -f %{pyproject_files} %{_bindir}/coolname %doc README.* %license LICENSE %changelog * Fri Apr 03 2026 Maxime Ripard - 4.1.0-1 - Initial package of python-coolname 4.1.0