%global python3_pkgversion 3.11 Name: python-sphinxext-rediraffe Version: 0.2.7 Release: 9.c14.py3.11%{?dist} Summary: Sphinx extension to redirect nonexistent pages License: MIT URL: https://wpilib.org/ Source0: https://github.com/wpilibsuite/sphinxext-rediraffe/archive/v%{version}/sphinxext-rediraffe-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel %global _desc %{expand: This sphinx extension redirects non-existent pages to working pages. Rediraffe can also check that deleted/renamed files in your git repo are redirected. Rediraffe creates a graph of all specified redirects and traverses it to point all internal urls to leaf urls. This means that chained redirects will be resolved. For example, if a config has 6 chained redirects, all 6 links will redirect directly to the final link. The end user will never experience more than 1 redirection. Note: Rediraffe supports the html and dirhtml builders.} %description %_desc %package -n python%{python3_pkgversion}-sphinxext-rediraffe Summary: %{summary} %description -n python%{python3_pkgversion}-sphinxext-rediraffe %_desc %prep %autosetup -n sphinxext-rediraffe-%{version} # The package needs jinja2 to function, but setup.py doesn't say so sed -i '/install_requires/s/\[/&"jinja2", /' setup.py # Retrieving the version with git fails sed -i 's/main/%{version}/' setup.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %check # The tests fail due to a missing dependency on seleniumbase %pyproject_check_import %install %pyproject_install %pyproject_save_files 'sphinxext*' for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s|(.*)$|\1-%{python3_pkgversion}|"<<<"$b"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s|(.*).([1-8])(.*)$|\1-%{python3_pkgversion}.\2\3|"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s|(.*).mo$|\1-%{python3_pkgversion}.mo|"<<<"$m"); done for l in $(find %{buildroot}/usr/lib64/lib* -type f -o -type l) ; do mv "$l" $(sed -re "s|(.*).so(.*)$|\1-py%{python3_pkgversion}.so\2|"<<<"$l"); done for p in $(find %{buildroot}/usr/lib64/pkgconfig/* -type f) ; do mv "$p" $(sed -re "s|(.*).pc$|\1-py%{python3_pkgversion}.pc|"<<<"$p"); done %files -n python%{python3_pkgversion}-sphinxext-rediraffe -f %{pyproject_files} %doc README.md %changelog * Sun Apr 21 2024 Ding-Yi Chen - 0.2.7-9.c14.py3.11 - Cut corner packaging * Fri Jan 26 2024 Fedora Release Engineering - 0.2.7-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.2.7-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.2.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Python Maint - 0.2.7-5 - Rebuilt for Python 3.12 * Thu Feb 23 2023 Jerry James - 0.2.7-4 - Dynamically generate BuildRequires * Fri Jan 20 2023 Fedora Release Engineering - 0.2.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.2.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.2.7-2 - Rebuilt for Python 3.11 * Fri Apr 29 2022 Jerry James - 0.2.7-1 - Initial RPM