Weaken the runtime dependency on the first party sphinxcontrib packages

For now, we don't BuildRequire them,
to allow orphaning + retirement without reporting sphinx as impacted.

Later, we can BuildRequire the remaining ones to produce a more complete documentation.
This commit is contained in:
Miro Hrončok 2023-11-08 12:48:25 +01:00
commit 3ae8dffd93
2 changed files with 226 additions and 1 deletions

View file

@ -25,7 +25,7 @@ Name: python-sphinx
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
Summary: Python documentation generator
@ -40,6 +40,21 @@ Source: %{pypi_source sphinx %{upstream_version}}
# which causes that test to fail.
Patch: sphinx-test_theming.diff
# Make the first party extensions optional
# This removes the runtime dependencies on:
# - sphinxcontrib.applehelp
# - sphinxcontrib.devhelp
# - sphinxcontrib.jsmath
# - sphinxcontrib.htmlhelp
# - sphinxcontrib.serializinghtml
# - sphinxcontrib.qthelp
# The majority of Fedora RPM packages does not need any of those.
# By removing the dependencies, we minimize the stuff that's pulled into
# the buildroots of 700+ of packages.
#
# The change is proposed upstream.
Patch: https://github.com/sphinx-doc/sphinx/pull/11747.patch
BuildArch: noarch
BuildRequires: make
@ -132,6 +147,17 @@ Summary: Python documentation generator
Recommends: graphviz
Recommends: ImageMagick
# Upstream Requires those, but we have a patch to remove the dependency.
# We keep them Recommended to preserve the default user experience.
# (We don't desire them in RHEL.)
%if %{undefined rhel}
Recommends: python%{python3_pkgversion}-sphinxcontrib-applehelp
Recommends: python%{python3_pkgversion}-sphinxcontrib-devhelp
Recommends: python%{python3_pkgversion}-sphinxcontrib-jsmath
Recommends: python%{python3_pkgversion}-sphinxcontrib-htmlhelp
Recommends: python%{python3_pkgversion}-sphinxcontrib-serializinghtml
Recommends: python%{python3_pkgversion}-sphinxcontrib-qthelp
%endif
%description -n python%{python3_pkgversion}-sphinx
Sphinx is a tool that makes it easy to create intelligent and
@ -369,6 +395,16 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
%changelog
* Wed Nov 08 2023 Miro Hrončok <mhroncok@redhat.com> - 1:7.2.6-2
- Weaken the runtime dependency on:
- python3-sphinxcontrib-applehelp
- python3-sphinxcontrib-devhelp
- python3-sphinxcontrib-jsmath
- python3-sphinxcontrib-htmlhelp
- python3-sphinxcontrib-serializinghtml
- python3-sphinxcontrib-qthelp
- Packages that want to use them during build need to BuildRequire them explicitly
* Thu Oct 26 2023 Karolina Surma <ksurma@redhat.com> - 1:7.2.6-1
- Update to 7.2.6
- Fixes rhbz#2232469