%bcond_without tests %global srcname circuitbreaker %global forgeurl https://github.com/fabfuel/circuitbreaker Version: 1.4.0 %global tag %{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Python "Circuit Breaker" implementation License: BSD-3-Clause URL: %forgeurl Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) %endif %global _description %{expand: This is a Python implementation of the "Circuit Breaker" Pattern.} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files circuitbreaker %check %pyproject_check_import %if %{with tests} %pytest %endif %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE.rst %doc README.rst %changelog %autochangelog