Blob Blame History Raw
# Created by pyp2rpm-3.3.6
%global pypi_name click-default-group

%global _description %{expand:
Provides DefaultGroup, a subclass of click.Group that invokes a default
subcommand instead of showing a help message when a subcommand is not passed.}

Name:           python-%{pypi_name}
Version:        1.2.2
Release:        %autorelease
Summary:        Extends click.Group to invoke a command without explicit subcommand name

License:        BSD
URL:            https://github.com/sublee/click-default-group/
Source0:        %url/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
# Fix detection of error message in test, related to ckick 8
Patch0:         https://patch-diff.githubusercontent.com/raw/click-contrib/click-default-group/pull/18.patch#/0001-Fix-detection-of-error-message.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%description %_description

%package -n     python3-%{pypi_name}
Summary:        %{summary}

%description -n python3-%{pypi_name} %_description

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%generate_buildrequires
echo 'python3-devel'
echo 'python3dist(pip) >= 19'
echo 'python3dist(packaging)'
echo 'python3dist(setuptools) >= 40.8'
echo 'python3dist(wheel)'
echo 'python3dist(click)'
echo 'python3dist(pytest)'

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files click_default_group

%check
%pytest

%files -n python3-%{pypi_name} -f %{pyproject_files}
%license LICENSE
%doc README.md

%changelog
%autochangelog