%global srcname beancount-black Name: python-%{srcname} Version: 1.0.5 Release: %autorelease Summary: Opinioned beancount formatter library License: MIT URL: https://github.com/LaunchPlatform/beancount-black # PyPI tarball doesn't include tests Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: This package provides an opinionated Beancount formatter library, just like Python's black code formatter, but for Beancount.} %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 beancount_black %check %pytest -v %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %{_bindir}/bean-black %changelog %autochangelog