%global pypi_name typer %global common_description %{expand: Typer is a library for building CLI applications that users will love using and developers will love creating. Based on Python 3.6+ type hints.} Name: python-%{pypi_name} Version: 0.3.2 Release: 1%{?dist} Summary: Typer, build great CLIs. Easy to code. Based on Python type hints License: MIT URL: https://github.com/tiangolo/typer Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %check export PIP_INDEX_URL=http://host.invalid./ export PIP_NO_DEPS=yes export PYTHONPATH=%{buildroot}%{python3_sitelib} export PATH=%{buildroot}%{_bindir}:$PATH %{python3} setup.py test %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog * Sun Mar 21 2021 Chandan Kumar (raukadah) - 0.3.2-1 - Initial package.