Michal Cyprian ed48752
%global pypi_name sphinx-click
Michal Cyprian ed48752
Michal Cyprian ed48752
Name:           python-%{pypi_name}
e8f6d2a
Version:        5.1.0
83a5837
Release:        %autorelease
Michal Cyprian ed48752
Summary:        Sphinx extension that automatically documents Click applications
Michal Cyprian ed48752
Michal Cyprian ed48752
License:        MIT
05f7115
URL:            https://github.com/click-contrib/sphinx-click
Michal Cyprian ed48752
Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Michal Cyprian ed48752
Michal Cyprian ed48752
BuildArch:      noarch
6dc34ea
Michal Cyprian ed48752
BuildRequires:  python3-devel
6a08aaa
# pytest is not an upstream dependency, we use it here out of convenience
6a08aaa
BuildRequires:  python3dist(pytest)
6a08aaa
BuildRequires:  pyproject-rpm-macros
Michal Cyprian ed48752
Michal Cyprian ed48752
%global package_desc \
Michal Cyprian ed48752
sphinx-click is a Sphinx plugin that allows you to automatically extract\
Michal Cyprian ed48752
documentation from a click-based application and include it in your docs.
Michal Cyprian ed48752
Michal Cyprian ed48752
%description
Michal Cyprian ed48752
%{package_desc}
Michal Cyprian ed48752
Michal Cyprian ed48752
%package -n     python3-%{pypi_name}
Michal Cyprian ed48752
Summary:        %{summary}
2e7ccfd
6dc34ea
# The doc subpackage was removed, obsolete it to have clean upgrade path
6dc34ea
# This was added in Fedora 35 and can be removed in Fedora 37
6dc34ea
Obsoletes:      python-%{pypi_name}-doc < 2.7.1-1
6dc34ea
Michal Cyprian ed48752
%description -n python3-%{pypi_name}
Michal Cyprian ed48752
%{package_desc}
Michal Cyprian ed48752
Michal Cyprian ed48752
%prep
Michal Cyprian ed48752
%autosetup -p1 -n %{pypi_name}-%{version}
Michal Cyprian ed48752
6a08aaa
%generate_buildrequires
6a08aaa
%pyproject_buildrequires -r
544ee9c
Michal Cyprian ed48752
%build
6a08aaa
%pyproject_wheel
Michal Cyprian ed48752
Michal Cyprian ed48752
%install
6a08aaa
%pyproject_install
6a08aaa
%pyproject_save_files sphinx_click
Michal Cyprian ed48752
Michal Cyprian ed48752
%check
6a08aaa
%pytest -v tests
Michal Cyprian ed48752
6a08aaa
%files -n python3-%{pypi_name} -f %{pyproject_files}
Michal Cyprian ed48752
%license LICENSE
6dc34ea
%doc README.rst ChangeLog
Michal Cyprian ed48752
Michal Cyprian ed48752
%changelog
83a5837
%autochangelog