|
|
|
|
@@ -1,49 +1,47 @@
|
|
|
|
|
# When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport
|
|
|
|
|
# When bootstrapping sphinx in Fedora, we don't yet have sphinxcontrib-websupport
|
|
|
|
|
# Without it we have warnings in docs, but it's not a hard dependency
|
|
|
|
|
%bcond_without websupport
|
|
|
|
|
# We don't want to support sphinxcontrib-websupport in RHEL, hence disabling the dependency
|
|
|
|
|
%bcond websupport %{undefined rhel}
|
|
|
|
|
# Also, we don't have all the tests requirements
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
%bcond tests 1
|
|
|
|
|
|
|
|
|
|
# Unset -s on python shebang to allow RPM-installed sphinx to be used
|
|
|
|
|
# with user-installed modules (#1903763)
|
|
|
|
|
%global py3_shebang_flags %nil
|
|
|
|
|
%undefine _py3_shebang_s
|
|
|
|
|
|
|
|
|
|
# No internet in Koji
|
|
|
|
|
%bcond_with internet
|
|
|
|
|
%bcond internet 0
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} > 7
|
|
|
|
|
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
|
|
|
|
%bcond_with imagemagick_tests
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without imagemagick_tests
|
|
|
|
|
%endif
|
|
|
|
|
%bcond imagemagick_tests %{undefined rhel}
|
|
|
|
|
# Same for filelock -- we don't want it in RHEL just to run a handful of tests here
|
|
|
|
|
%bcond filelock_tests %{undefined rhel}
|
|
|
|
|
|
|
|
|
|
# During texlive updates, sometimes the latex environment is unstable
|
|
|
|
|
%bcond_without latex_tests
|
|
|
|
|
%bcond latex_tests 1
|
|
|
|
|
|
|
|
|
|
%global upstream_name Sphinx
|
|
|
|
|
|
|
|
|
|
Name: python-sphinx
|
|
|
|
|
%global general_version 4.4.0
|
|
|
|
|
%global general_version 6.2.1
|
|
|
|
|
#global prerel ...
|
|
|
|
|
%global upstream_version %{general_version}%{?prerel}
|
|
|
|
|
Version: %{general_version}%{?prerel:~%{prerel}}
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Summary: Python documentation generator
|
|
|
|
|
|
|
|
|
|
# Unless otherwise noted, the license for code is BSD
|
|
|
|
|
# sphinx/util/inspect.py has bits licensed with PSF license v2 (Python)
|
|
|
|
|
# Unless otherwise noted, the license for code is BSD-2-Clause
|
|
|
|
|
# sphinx/themes/haiku/static/haiku.css_t has bits licensed with MIT
|
|
|
|
|
# JS: JQuery, Underscore, css3-mediaqueries are available under MIT
|
|
|
|
|
License: BSD and Python and MIT
|
|
|
|
|
License: BSD-2-Clause AND MIT
|
|
|
|
|
|
|
|
|
|
URL: https://www.sphinx-doc.org/
|
|
|
|
|
Source0: %{pypi_source %{upstream_name} %{upstream_version}}
|
|
|
|
|
Source: %{pypi_source %{upstream_name} %{upstream_version}}
|
|
|
|
|
|
|
|
|
|
# Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster
|
|
|
|
|
# which causes that test to fail.
|
|
|
|
|
Patch1: sphinx-test_theming.diff
|
|
|
|
|
Patch: sphinx-test_theming.diff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
@@ -55,9 +53,6 @@ BuildRequires: pyproject-rpm-macros
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# for fixes
|
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
# tests import _testcapi
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-test
|
|
|
|
|
@@ -140,10 +135,6 @@ Summary: Python documentation generator
|
|
|
|
|
Recommends: graphviz
|
|
|
|
|
Recommends: ImageMagick
|
|
|
|
|
|
|
|
|
|
# Bundled JavaScript
|
|
|
|
|
Provides: bundled(jquery) = 3.5.1
|
|
|
|
|
Provides: bundled(underscore) = 1.3.1
|
|
|
|
|
Provides: bundled(css3-mediaqueries) = 1.0
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-sphinx
|
|
|
|
|
Sphinx is a tool that makes it easy to create intelligent and
|
|
|
|
|
@@ -225,7 +216,7 @@ builder.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
License: BSD
|
|
|
|
|
License: BSD-2-Clause
|
|
|
|
|
Recommends: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
@@ -236,24 +227,25 @@ Brandl. It was originally created to translate the new Python
|
|
|
|
|
documentation, but has now been cleaned up in the hope that it will be
|
|
|
|
|
useful to many other projects.
|
|
|
|
|
|
|
|
|
|
This package contains documentation in reST and HTML formats.
|
|
|
|
|
This package contains documentation in the HTML format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{upstream_name}-%{upstream_version} -p1
|
|
|
|
|
|
|
|
|
|
# fix line encoding of bundled jquery.js
|
|
|
|
|
dos2unix -k ./sphinx/themes/basic/static/jquery.js
|
|
|
|
|
|
|
|
|
|
%if %{without imagemagick_tests}
|
|
|
|
|
rm tests/test_ext_imgconverter.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Don't measure coverage:
|
|
|
|
|
sed -i '/pytest-cov/d' setup.py
|
|
|
|
|
# Not needed on recent Pythons, https://github.com/sphinx-doc/sphinx/pull/8483
|
|
|
|
|
sed -i '/typed_ast/d' setup.py
|
|
|
|
|
%if %{without filelock_tests}
|
|
|
|
|
sed -i '/filelock/d' pyproject.toml
|
|
|
|
|
rm tests/test_build_linkcheck.py tests/test_ext_intersphinx.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{defined rhel}
|
|
|
|
|
# unwanted dependency in RHEL, https://bugzilla.redhat.com/show_bug.cgi?id=1945182
|
|
|
|
|
sed -i '/html5lib/d' pyproject.toml
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires -r %{?with_tests:-x test}
|
|
|
|
|
@@ -268,6 +260,10 @@ export SPHINXBUILD="%{python3} ../sphinx/cmd/build.py"
|
|
|
|
|
make html SPHINXBUILD="$SPHINXBUILD"
|
|
|
|
|
make man SPHINXBUILD="$SPHINXBUILD"
|
|
|
|
|
rm -rf _build/html/.buildinfo
|
|
|
|
|
# Those files are copied to _build/html/_images and loaded to the
|
|
|
|
|
# html pages from there - we can safely remove the duplicated and unused files
|
|
|
|
|
rm -rf _build/html/_static/themes _build/html/_static/tutorial
|
|
|
|
|
rm -f _build/html/_static/more.png _build/html/_static/translation.svg
|
|
|
|
|
mv _build/html ..
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
@@ -294,12 +290,6 @@ do
|
|
|
|
|
done
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# Deliver rst files
|
|
|
|
|
rm -rf doc/_build
|
|
|
|
|
sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-build|' doc/Makefile
|
|
|
|
|
mv doc reST
|
|
|
|
|
rm reST/make.bat
|
|
|
|
|
|
|
|
|
|
# Move language files to /usr/share;
|
|
|
|
|
# patch to support this incorporated in 0.6.6
|
|
|
|
|
pushd %{buildroot}%{python3_sitelib}
|
|
|
|
|
@@ -333,9 +323,19 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
# Currently, all linkcheck tests and test_latex_images need internet
|
|
|
|
|
# test_build_latex_doc needs internet to download pictures,
|
|
|
|
|
# but fails also with it enabled, we decided to skip it entirely
|
|
|
|
|
# In RHEL builds, skip tests which use html5lib (excluded above)
|
|
|
|
|
%pytest \
|
|
|
|
|
%if %{defined rhel}
|
|
|
|
|
--ignore tests/test_build_html.py \
|
|
|
|
|
--ignore tests/test_build_latex.py \
|
|
|
|
|
--ignore tests/test_build_texinfo.py \
|
|
|
|
|
--ignore tests/test_domain_std.py \
|
|
|
|
|
--ignore tests/test_smartquotes.py \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{without internet}
|
|
|
|
|
-k "not linkcheck and not test_latex_images" \
|
|
|
|
|
-k "not linkcheck and not test_latex_images and not test_build_latex_doc" \
|
|
|
|
|
%endif
|
|
|
|
|
;
|
|
|
|
|
%endif
|
|
|
|
|
@@ -347,7 +347,7 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
|
|
|
|
%{_bindir}/sphinx-*
|
|
|
|
|
%{python3_sitelib}/sphinx/
|
|
|
|
|
%dir %{python3_sitelib}/sphinxcontrib/
|
|
|
|
|
%{python3_sitelib}/Sphinx-%{upstream_version}.dist-info/
|
|
|
|
|
%{python3_sitelib}/sphinx-%{upstream_version}.dist-info/
|
|
|
|
|
%dir %{_datadir}/sphinx/
|
|
|
|
|
%dir %{_datadir}/sphinx/locale
|
|
|
|
|
%dir %{_datadir}/sphinx/locale/*
|
|
|
|
|
@@ -360,10 +360,71 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc html reST
|
|
|
|
|
%doc html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Jul 27 2023 Miro Hrončok <mhroncok@redhat.com> - 1:6.2.1-4
|
|
|
|
|
- Don't use filelock to test this package on RHEL
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.2.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 13 2023 Karolina Surma <ksurma@redhat.com> - 1:6.2.1-2
|
|
|
|
|
- Don't use websupport to build documentation on RHEL
|
|
|
|
|
|
|
|
|
|
* Mon Jun 26 2023 Karolina Surma <ksurma@redhat.com> - 1:6.2.1-1
|
|
|
|
|
- Update to 6.2.1
|
|
|
|
|
- Fixes rhbz#2188968
|
|
|
|
|
|
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1:6.1.3-4
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:6.1.3-3
|
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Wed May 31 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1:6.1.3-2
|
|
|
|
|
- Avoid html5lib test dependency in RHEL builds
|
|
|
|
|
|
|
|
|
|
* Fri Mar 10 2023 Karolina Surma <ksurma@redhat.com> - 1:6.1.3-1
|
|
|
|
|
- Update to 6.1.3
|
|
|
|
|
- Fixes rhbz#2135122
|
|
|
|
|
|
|
|
|
|
* Thu Mar 09 2023 Karolina Surma <ksurma@redhat.com> - 1:5.3.0-4
|
|
|
|
|
- Fix tests related to missing setuptools and Babel 2.12
|
|
|
|
|
- Fixes rhbz#2176685
|
|
|
|
|
|
|
|
|
|
* Tue Jan 31 2023 Karolina Surma <ksurma@redhat.com> - 1:5.3.0-3
|
|
|
|
|
- Fix tests with python-pygments 2.14+
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:5.3.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Nov 08 2022 Karolina Surma <ksurma@redhat.com> - 1:5.3.0-1
|
|
|
|
|
- Update to 5.3.0
|
|
|
|
|
- Fixes rhbz#2129546
|
|
|
|
|
|
|
|
|
|
* Mon Aug 15 2022 Karolina Surma <ksurma@redhat.com> - 1:5.1.1-1
|
|
|
|
|
- Update to 5.1.1
|
|
|
|
|
- Fixes rhbz#2110473
|
|
|
|
|
- Remove reST documentation from the -doc package, ship only HTML
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:5.0.2-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jun 21 2022 Karolina Surma <ksurma@redhat.com> - 1:5.0.2-1
|
|
|
|
|
- Update to 5.0.2
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:4.5.0-3
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:4.5.0-2
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Fri Apr 01 2022 Karolina Surma <ksurma@redhat.com> - 1:4.5.0-1
|
|
|
|
|
- Update to 4.5.0
|
|
|
|
|
- Fixes rhbz#2068924
|
|
|
|
|
|
|
|
|
|
* Tue Feb 01 2022 Karolina Surma <ksurma@redhat.com> - 1:4.4.0-1
|
|
|
|
|
- Update to 4.4.0
|
|
|
|
|
- Fixes rhbz#2033955
|
|
|
|
|
|