%global pypi_name pipcl %global module_name pipcl Name: python-%{pypi_name} Version: 2 Release: %autorelease Summary: Python packaging operations including PEP-517 support License: AGPL-3.0-or-later URL: https://github.com/ArtifexSoftware/pipcl Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz # alternative: i%%{pypi_source %%{pypi_name}} # Not yet in tagged release: Source1: https://raw.githubusercontent.com/ArtifexSoftware/pipcl/refs/heads/main/COPYING BuildArch: noarch BuildRequires: python3-devel # test dependencies not picked up by generator BuildRequires: python3dist(pytest) %global _description %{expand: Python packaging operations, including PEP-517 support, for use by a script.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} -p 1 %generate_buildrequires %pyproject_buildrequires -R %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -L %{module_name} cp -p %{SOURCE1} COPYING %check # This is the only test which does not require the internet: %pytest -k test_zip %files -n python3-%{pypi_name} -f %{pyproject_files} %license COPYING %changelog %autochangelog