Blame python-sphinxext-rediraffe.spec

abc1245
Name:           python-sphinxext-rediraffe
abc1245
Version:        0.2.7
266d9ee
Release:        4%{?dist}
abc1245
Summary:        Sphinx extension to redirect nonexistent pages
abc1245
License:        MIT
abc1245
URL:            https://wpilib.org/
abc1245
Source0:        https://github.com/wpilibsuite/sphinxext-rediraffe/archive/v%{version}/sphinxext-rediraffe-%{version}.tar.gz
abc1245
abc1245
BuildArch:      noarch
abc1245
abc1245
BuildRequires:  python3-devel
410216f
BuildRequires:  pyproject-rpm-macros
abc1245
BuildRequires:  %{py3_dist jinja2}
abc1245
BuildRequires:  %{py3_dist pip}
abc1245
BuildRequires:  %{py3_dist setuptools}
abc1245
BuildRequires:  %{py3_dist sphinx}
abc1245
BuildRequires:  %{py3_dist wheel}
abc1245
abc1245
%global _desc %{expand:
abc1245
This sphinx extension redirects non-existent pages to working pages.
abc1245
Rediraffe can also check that deleted/renamed files in your git repo are
abc1245
redirected.
abc1245
abc1245
Rediraffe creates a graph of all specified redirects and traverses it to
abc1245
point all internal urls to leaf urls.  This means that chained redirects
abc1245
will be resolved.  For example, if a config has 6 chained redirects, all
abc1245
6 links will redirect directly to the final link.  The end user will
abc1245
never experience more than 1 redirection.
abc1245
abc1245
Note: Rediraffe supports the html and dirhtml builders.}
abc1245
abc1245
%description %_desc
abc1245
abc1245
%package     -n python3-sphinxext-rediraffe
abc1245
Summary:        %{summary}
abc1245
abc1245
%description -n python3-sphinxext-rediraffe %_desc
abc1245
abc1245
%prep
abc1245
%autosetup -n sphinxext-rediraffe-%{version}
abc1245
abc1245
# The package needs jinja2 to function, but setup.py doesn't say so
abc1245
sed -i '/install_requires/s/\[/&"jinja2", /' setup.py
abc1245
abc1245
# Retrieving the version with git fails
abc1245
sed -i 's/main/%{version}/' setup.py
abc1245
abc1245
%build
abc1245
%pyproject_wheel
abc1245
abc1245
%check
abc1245
# The tests fail due to a missing dependency on seleniumbase
abc1245
%pyproject_check_import
abc1245
abc1245
%install
abc1245
%pyproject_install
abc1245
%pyproject_save_files 'sphinxext*'
abc1245
abc1245
%files -n python3-sphinxext-rediraffe -f %{pyproject_files}
abc1245
%doc README.md
abc1245
abc1245
%changelog
266d9ee
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.7-4
266d9ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
266d9ee
4792465
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.7-3
4792465
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4792465
1a4b255
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.2.7-2
1a4b255
- Rebuilt for Python 3.11
1a4b255
abc1245
* Fri Apr 29 2022 Jerry James <loganjerry@gmail.com> - 0.2.7-1
abc1245
- Initial RPM