%global srcname multimethod Name: python-%{srcname} Version: 2.0 Release: %autorelease Summary: Multiple argument dispatching License: Apache-2.0 URL: https://github.com/coady/multimethod Source: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: Multimethod provides a decorator for adding multiple argument dispatching to functions. The decorator creates a multimethod object as needed, and registers the function with its annotations.} %description %_description %package -n python3-multimethod Summary: %{summary} %description -n python3-multimethod %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Without this is tried to look for a nonexisting setup.py and fails cat >> pyproject.toml <<'EOF' [build-system] requires = ["setuptools >= 61.0"] build-backend = "setuptools.build_meta" EOF %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check %pytest -v %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog %autochangelog