%global srcname beanhub-forms %global forgeurl https://github.com/LaunchPlatform/%{srcname} %bcond check 1 Name: python-%{srcname} Version: 0.1.3 Release: %autorelease Summary: Library for generating BeanHub's custom forms License: MIT URL: https://beanhub-forms-docs.beanhub.io # PyPI tarball doesn't include tests Source: %{forgeurl}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel %if %{with check} BuildRequires: python3dist(multidict) BuildRequires: python3dist(pytest) %endif %global _description %{expand: BeanHub Forms allows users to easily define their custom forms and templates in YAML format for generating Beancount entries.} %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 beanhub_forms %check %if %{with check} %pytest -v %else %pyproject_check_import %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog %autochangelog