%global srcname importlib-metadata-argparse-version Name: python-%{srcname} Version: 3.0.0 Release: %autorelease Summary: Argparse action to define CLI version via importlib.metadata License: BSD-3-Clause URL: https://github.com/mondeja/importlib-metadata-argparse-version # PyPI tarball doesn't include tests Source: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: This package provides a Python argparse module action to define the CLI version with a delayed call to importlib.metadata.version only when --version argument is passed.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l importlib_metadata_argparse_version %check %pytest -v %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog %autochangelog