944223b
%global srcname  click-help-colors
944223b
%global pkgname  python-click-help-colors
944223b
%global slugname click_help_colors
944223b
%global forgeurl https://github.com/click-contrib/click-help-colors
7c4f59d
944223b
%global common_description %{expand:
944223b
Colorization of help messages in Click}
944223b
944223b
%bcond_without tests
944223b
944223b
Name:           %{pkgname}
c93b15a
Version:        0.9.1
944223b
%forgemeta
944223b
Release:        %autorelease
7c4f59d
Summary:        Colorization of help messages in Click
7c4f59d
License:        MIT
944223b
URL:            %{forgeurl}
944223b
Source:         %{pypi_source}
944223b
Patch:          0001_updating_test_optional_packages_target_name.patch
7c4f59d
BuildArch:      noarch
7c4f59d
7c4f59d
BuildRequires: python3-devel
7c4f59d
944223b
%description %{common_description}
7c4f59d
944223b
%package -n python3-%{srcname}
944223b
Summary: %{summary}
7c4f59d
944223b
%description -n python3-%{srcname} %{common_description}
7c4f59d
7c4f59d
%prep
944223b
%forgeautosetup -p1
944223b
944223b
%generate_buildrequires
944223b
%pyproject_buildrequires %{?with_tests:-x test}
7c4f59d
7c4f59d
%build
944223b
%pyproject_wheel
7c4f59d
7c4f59d
%install
944223b
%pyproject_install
944223b
%pyproject_save_files %{slugname}
7c4f59d
944223b
%if %{with tests}
7c4f59d
%check
944223b
%pytest -vv
944223b
%endif
7c4f59d
944223b
%files -n python3-%{srcname} -f %{pyproject_files}
7c4f59d
%license LICENSE.txt
7c4f59d
%doc examples README.rst
7c4f59d
7c4f59d
%changelog
944223b
%autochangelog