# Enable tests by default %bcond_without tests %global srcname pytest-html Name: python-%{srcname} Version: 3.1.1 Release: 1%{?dist} Summary: Pytest plugin for generating HTML test reports License: MPLv2.0 URL: https://github.com/pytest-dev/%{srcname} Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: pytest-html is a plugin for pytest that generates a HTML report for test results.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %{?with_tests:-t} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %(echo %{srcname} | tr - _) %check %tox %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %license LICENSE %changelog * Mon Nov 01 2021 Maxwell G - 3.1.1-1 - Initial package