forked from pool/python-Sphinx
- Add upstream patches to fix tests with Python 3.14:
* autodoc.patch * autosummary.patch * typing.patch - Proactively add upstream patch to fix tests with docutils 0.22: * docutils022.patch - Rename multibuild flavor 'test' to 'test+doc' to better reflect the current behaviour OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=288
This commit is contained in:
26
.gitattributes
vendored
Normal file
26
.gitattributes
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
python3.inv filter=lfs diff=lfs merge=lfs -text
|
||||
readthedocs.inv filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test+doc</package>
|
||||
</multibuild>
|
||||
33
autodoc.patch
Normal file
33
autodoc.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 0227606e71dc765ed60cd0ad2c580a43b5ffca4f Mon Sep 17 00:00:00 2001
|
||||
From: James Addison <55152140+jayaddison@users.noreply.github.com>
|
||||
Date: Mon, 12 May 2025 16:52:52 +0000
|
||||
Subject: [PATCH] Fix tests for Python 3.14.0a7 (#13527)
|
||||
|
||||
Authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
|
||||
---
|
||||
tests/test_extensions/test_ext_autodoc.py | 6 +++++-
|
||||
tests/test_extensions/test_ext_autodoc_configs.py | 12 ++++++++++--
|
||||
2 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py
|
||||
index a06c1bbe30d..7aa12db3c32 100644
|
||||
--- a/tests/test_extensions/test_ext_autodoc.py
|
||||
+++ b/tests/test_extensions/test_ext_autodoc.py
|
||||
@@ -938,10 +938,14 @@ def test_autodoc_special_members(app):
|
||||
}
|
||||
if sys.version_info >= (3, 13, 0, 'alpha', 5):
|
||||
options['exclude-members'] = '__static_attributes__,__firstlineno__'
|
||||
+ if sys.version_info >= (3, 14, 0, 'alpha', 7):
|
||||
+ ann_attr_name = '__annotations_cache__'
|
||||
+ else:
|
||||
+ ann_attr_name = '__annotations__'
|
||||
actual = do_autodoc(app, 'class', 'target.Class', options)
|
||||
assert list(filter(lambda l: '::' in l, actual)) == [
|
||||
'.. py:class:: Class(arg)',
|
||||
- ' .. py:attribute:: Class.__annotations__',
|
||||
+ f' .. py:attribute:: Class.{ann_attr_name}',
|
||||
' .. py:attribute:: Class.__dict__',
|
||||
' .. py:method:: Class.__init__(arg)',
|
||||
' .. py:attribute:: Class.__module__',
|
||||
29
autosummary.patch
Normal file
29
autosummary.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 8962398b761c3d85a7c74b6f789b3ffb127bde0c Mon Sep 17 00:00:00 2001
|
||||
From: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
||||
Date: Thu, 6 Mar 2025 16:03:44 +0000
|
||||
Subject: [PATCH] autosummary: Update test for Python 3.14.0a5+ (#13418)
|
||||
|
||||
`types.UnionType` and `typing.Union` have been merged.
|
||||
---
|
||||
tests/test_extensions/test_ext_autosummary.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_extensions/test_ext_autosummary.py b/tests/test_extensions/test_ext_autosummary.py
|
||||
index 35dc7d180ef..c807ddba3d1 100644
|
||||
--- a/tests/test_extensions/test_ext_autosummary.py
|
||||
+++ b/tests/test_extensions/test_ext_autosummary.py
|
||||
@@ -447,8 +447,12 @@ def test_autosummary_generate_content_for_module_imported_members(app):
|
||||
]
|
||||
assert context['functions'] == ['bar']
|
||||
assert context['all_functions'] == ['_quux', 'bar']
|
||||
- assert context['classes'] == ['Class', 'Foo']
|
||||
- assert context['all_classes'] == ['Class', 'Foo', '_Baz']
|
||||
+ if sys.version_info >= (3, 14, 0, 'alpha', 5):
|
||||
+ assert context['classes'] == ['Class', 'Foo', 'Union']
|
||||
+ assert context['all_classes'] == ['Class', 'Foo', 'Union', '_Baz']
|
||||
+ else:
|
||||
+ assert context['classes'] == ['Class', 'Foo']
|
||||
+ assert context['all_classes'] == ['Class', 'Foo', '_Baz']
|
||||
assert context['exceptions'] == ['Exc']
|
||||
assert context['all_exceptions'] == ['Exc', '_Exc']
|
||||
assert context['attributes'] == ['CONSTANT1', 'qux', 'quuz', 'non_imported_member']
|
||||
50
docutils022.patch
Normal file
50
docutils022.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 68d56109ff50dd81dd31d4a01e3dccbd006c50ee Mon Sep 17 00:00:00 2001
|
||||
From: James Addison <55152140+jayaddison@users.noreply.github.com>
|
||||
Date: Mon, 2 Jun 2025 22:02:48 +0000
|
||||
Subject: [PATCH] Tests: update LaTeX label test expectations from Docutils
|
||||
r10151 (#13610)
|
||||
|
||||
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
||||
---
|
||||
tests/test_builders/test_build_latex.py | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py
|
||||
index 0d1c607462d..37e708a021e 100644
|
||||
--- a/tests/test_builders/test_build_latex.py
|
||||
+++ b/tests/test_builders/test_build_latex.py
|
||||
@@ -12,6 +12,7 @@
|
||||
from subprocess import CalledProcessError
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
+import docutils
|
||||
import pygments
|
||||
import pytest
|
||||
|
||||
@@ -1959,10 +1960,16 @@ def test_latex_labels(app: SphinxTestApp) -> None:
|
||||
|
||||
result = (app.outdir / 'projectnamenotset.tex').read_text(encoding='utf8')
|
||||
|
||||
+ # ref: docutils r10151
|
||||
+ if docutils.__version_info__[:2] < (0, 22):
|
||||
+ figure_id, table_id = 'id1', 'id2'
|
||||
+ else:
|
||||
+ figure_id, table_id = 'id2', 'id3'
|
||||
+
|
||||
# figures
|
||||
assert (
|
||||
r'\caption{labeled figure}'
|
||||
- r'\label{\detokenize{index:id1}}'
|
||||
+ r'\label{\detokenize{index:' + figure_id + '}}'
|
||||
r'\label{\detokenize{index:figure2}}'
|
||||
r'\label{\detokenize{index:figure1}}'
|
||||
r'\end{figure}'
|
||||
@@ -1988,7 +1995,7 @@ def test_latex_labels(app: SphinxTestApp) -> None:
|
||||
# tables
|
||||
assert (
|
||||
r'\sphinxcaption{table caption}'
|
||||
- r'\label{\detokenize{index:id2}}'
|
||||
+ r'\label{\detokenize{index:' + table_id + '}}'
|
||||
r'\label{\detokenize{index:table2}}'
|
||||
r'\label{\detokenize{index:table1}}'
|
||||
) in result
|
||||
4438
python-Sphinx.changes
Normal file
4438
python-Sphinx.changes
Normal file
File diff suppressed because it is too large
Load Diff
99
python-Sphinx.keyring
Normal file
99
python-Sphinx.keyring
Normal file
@@ -0,0 +1,99 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFdKfSIBEACqeu2LVjyOCsTBC8Ag5P0jdosFCQDBf4dKJSE4admAiUnlpMWd
|
||||
OcAc33gntOpuMiAeV0xzZps26pCgVm7WbwmYWLkh106l288PDPURnVbYMQYCiXWI
|
||||
Gz3DEUwnCi18DFLZo9tCmJSAe8B+ALS+RIrYOQMCqeJxTYFkniBalQXewqOiPHoF
|
||||
IH3MHu+JSoV2D7rpomjmPqWLZCVqUJioccArTbQ2jM7cpjYXcewdYT2lb5Xd0R3i
|
||||
NLDCGQ/USyxfj887N4OpUnsDZrjqM1XEyJBJ5IrJvVWzjD3HZlme7Gk7FE748GUX
|
||||
MWOBRZSazLQf8bn097lbLPCO3dRH8FZliJ5iaEdh+DEvd2PAGJ75nE+8fkuhJL6i
|
||||
1lGd8AgiEa9byraLSYrGfKQ3IARa9fK81eg/rhq2CiJNMb6K+X212AKa8wsUcvbR
|
||||
o0rCXe/t2X5ulVAGUJKUdVq8KOGcD+UvFETkmGkrmc0nkVfMREVk344TcjWrgn63
|
||||
Z/5sFcSNooPcUifWv6gjFiudrGY4LWFlR1fnacJs8sKEBziQ05TW//CcBUAdTjou
|
||||
9o5CSe8CM0Pb29Gtlwv3zU5PPjR9ZBzm3sqqF3CBtEWKb7RnAWIi2ePokOa9mKfk
|
||||
cyR4vuSr1VXmsrXp4WiV4hnVzkHsaFIJEX8CqnXI2ODbRH61UhhzhfvpEQARAQAB
|
||||
tCRUYWtlc2hpIEtPTUlZQSA8aS50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G3RzSTn
|
||||
q//Cs0RqRWizEJTASoFUAsW1hPMME6/kuAyE+CjwI9kxnKDyaFTO1luDwsMx9GsH
|
||||
5FL7vOTElzvN/y1AY13MFqM7IJlm6v8XImP3jBriK01QYYhP4b+9vSLzy/nt6aWa
|
||||
pgb1Y2hwYIb9SwWs8TAJZZgeqZ6lXz0+N6aW95RwtdW1AwyY0zVJ5BgbmOJQ7Eg+
|
||||
QFA+mrhjKZmd0Lfs19OKrFe+WeYPk3SJNW7B/ZrL9UpwFX8/BCXDiqhMVpsTYjjB
|
||||
HIeutg1Mz5vgoR0j7CSZgak5+mQA/ICiQWgcCpOnOvvgg6Y4VNYQ6Ul0LYkamrPr
|
||||
pT8nHr/fw+3p4KNp5/bmC+nyZYQUcNBVVy3uqUhP6BQKqDfhc0vEb88LdfOdzkJp
|
||||
fmjoCrdis0UqAsmVSgjJ5Nq3ZVFtRhJKwc9DcmAgayqLnOI/
|
||||
=+lXz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
379
python-Sphinx.spec
Normal file
379
python-Sphinx.spec
Normal file
@@ -0,0 +1,379 @@
|
||||
#
|
||||
# spec file for package python-Sphinx
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test+doc"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-Sphinx%{psuffix}
|
||||
Version: 8.2.3
|
||||
Release: 0
|
||||
Summary: Python documentation generator
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://www.sphinx-doc.org
|
||||
Source: https://files.pythonhosted.org/packages/source/s/sphinx/sphinx-%{version}.tar.gz
|
||||
# Provide intersphinx inventory offline, run update-intersphinx.sh
|
||||
# https://docs.python.org/3/objects.inv
|
||||
Source2: python3.inv
|
||||
# https://requests.readthedocs.io/en/stable/objects.inv
|
||||
Source3: requests.inv
|
||||
# https://docs.readthedocs.io/en/stable/objects.inv
|
||||
Source4: readthedocs.inv
|
||||
Source5: update-intersphinx.sh
|
||||
Source99: python-Sphinx.keyring
|
||||
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinx/pull/13527 Followup-to: Fix tests for Python 3.14a7+
|
||||
Patch0: autodoc.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinx/commit/8962398b761c3d85a7c74b6f789b3ffb127bde0c autosummary: Update test for Python 3.14.0a5+
|
||||
Patch1: autosummary.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinx/commit/e01e42f5fc738815b8499c4ede30c6caf130f0a4 Fix INVALID_BUILTIN_CLASSES test for Python 3.14.0a6+
|
||||
Patch2: typing.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/sphinx-doc/sphinx/commit/68d56109ff50dd81dd31d4a01e3dccbd006c50ee Tests: update LaTeX label test expectations from Docutils r10151
|
||||
Patch3: docutils022.patch
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: %{python_module flit-core >= 3.11}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-pip
|
||||
# workaround for suboptimal CentOS-7 project config
|
||||
#!BuildIgnore: texinfo
|
||||
Requires: python-Babel >= 1.3
|
||||
Requires: python-Jinja2 >= 2.3
|
||||
Requires: python-Pygments >= 2.14
|
||||
Requires: python-alabaster >= 0.7
|
||||
Requires: python-defusedxml >= 0.7.1
|
||||
Requires: python-docutils >= 0.12
|
||||
Requires: python-imagesize
|
||||
Requires: python-packaging
|
||||
Requires: python-requests >= 2.5.0
|
||||
Requires: python-roman-numerals
|
||||
Requires: python-snowballstemmer >= 1.1
|
||||
Requires: python-sphinxcontrib-applehelp
|
||||
Requires: python-sphinxcontrib-devhelp
|
||||
Requires: python-sphinxcontrib-htmlhelp >= 2.0.0
|
||||
Requires: python-sphinxcontrib-jsmath
|
||||
Requires: python-sphinxcontrib-qthelp >= 1.0.2
|
||||
Requires: python-sphinxcontrib-serializinghtml >= 1.1.9
|
||||
Recommends: python-SQLAlchemy >= 0.9
|
||||
Recommends: python-Sphinx-doc-man
|
||||
Recommends: python-Whoosh >= 2.0
|
||||
Suggests: python-sphinx_rtd_theme
|
||||
BuildArch: noarch
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module Sphinx = %{version}}
|
||||
BuildRequires: %{python_module Sphinx-latex = %{version}}
|
||||
BuildRequires: %{python_module defusedxml >= 0.7.1}
|
||||
BuildRequires: %{python_module filelock}
|
||||
BuildRequires: %{python_module html5lib}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module sphinxcontrib-websupport}
|
||||
BuildRequires: %{python_module testsuite}
|
||||
BuildRequires: %{python_module typing-extensions}
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: graphviz
|
||||
# For PNG format
|
||||
BuildRequires: graphviz-gd
|
||||
# For PDF format (!?)
|
||||
BuildRequires: graphviz-gnome
|
||||
BuildRequires: texlive-tex-gyre
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Sphinx is a tool that facilitates creating documentation for Python
|
||||
projects (or other documents consisting of multiple reStructuredText
|
||||
sources). It was originally created for the Python documentation, and
|
||||
supports Python project documentation well, but C/C++ is likewise
|
||||
supported.
|
||||
|
||||
Sphinx uses reStructuredText as its markup language. Sphinx draws from
|
||||
the parsing and translating suite, the Docutils.
|
||||
|
||||
%package latex
|
||||
Summary: Sphinx packages for LaTeX
|
||||
Group: Productivity/Publishing/TeX/Base
|
||||
Requires: python-Sphinx = %{version}
|
||||
Requires: texlive-dvipng
|
||||
Requires: texlive-gnu-freefont
|
||||
Requires: texlive-latex
|
||||
Requires: texlive-latexmk
|
||||
Requires: texlive-makeindex
|
||||
Requires: texlive-metafont
|
||||
Requires: texlive-pdftex
|
||||
Requires: tex(8r.enc)
|
||||
Requires: tex(alltt.sty)
|
||||
Requires: tex(amsfonts.sty)
|
||||
Requires: tex(amsmath.sty)
|
||||
Requires: tex(amssymb.sty)
|
||||
Requires: tex(amsthm.sty)
|
||||
Requires: tex(anyfontsize.sty)
|
||||
Requires: tex(array.sty)
|
||||
Requires: tex(article.cls)
|
||||
Requires: tex(atbegshi.sty)
|
||||
Requires: tex(babel.sty)
|
||||
Requires: tex(bm.sty)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(color.sty)
|
||||
Requires: tex(colortbl.sty)
|
||||
Requires: tex(dvipdfmx.def)
|
||||
Requires: tex(english.ldf)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(fancybox.sty)
|
||||
Requires: tex(fancyhdr.sty)
|
||||
Requires: tex(fancyvrb.sty)
|
||||
Requires: tex(float.sty)
|
||||
Requires: tex(fncychap.sty)
|
||||
Requires: tex(fontenc.sty)
|
||||
Requires: tex(footnote.sty)
|
||||
Requires: tex(framed.sty)
|
||||
Requires: tex(graphics.sty)
|
||||
Requires: tex(graphicx.sty)
|
||||
Requires: tex(hypcap.sty)
|
||||
Requires: tex(hyperref.sty)
|
||||
Requires: tex(ifthen.sty)
|
||||
Requires: tex(inputenc.sty)
|
||||
Requires: tex(longtable.sty)
|
||||
Requires: tex(luatex85.sty)
|
||||
Requires: tex(makeidx.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(newfloat.sty)
|
||||
Requires: tex(palatino.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(pcrr.tfm)
|
||||
Requires: tex(pdftex.def)
|
||||
Requires: tex(pdftex.map)
|
||||
Requires: tex(phvr.tfm)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(pplr.tfm)
|
||||
Requires: tex(preview.sty)
|
||||
Requires: tex(ptmr.tfm)
|
||||
Requires: tex(pzcmi.tfm)
|
||||
Requires: tex(tabulary.sty)
|
||||
Requires: tex(textcomp.sty)
|
||||
Requires: tex(tgtermes.sty)
|
||||
Requires: tex(threeparttable.sty)
|
||||
Requires: tex(times.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(utf8.def)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(varwidth.sty)
|
||||
Requires: tex(wrapfig.sty)
|
||||
|
||||
%description latex
|
||||
Sphinx is a tool that facilitates creating documentation for Python
|
||||
projects (or other documents consisting of multiple reStructuredText
|
||||
sources).
|
||||
|
||||
This package contains the LaTeX components for python-Sphinx.
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%package -n python-Sphinx-doc
|
||||
Summary: Man files for python-Sphinx
|
||||
Group: Documentation/Other
|
||||
Requires: python3-Sphinx = %{version}
|
||||
|
||||
%description -n python-Sphinx-doc
|
||||
Sphinx is a tool that facilitates creating documentation for Python
|
||||
projects (or other documents consisting of multiple reStructuredText
|
||||
sources). It was originally created for the Python documentation, and
|
||||
supports Python project documentation well, but C/C++ is likewise
|
||||
supported.
|
||||
|
||||
Sphinx uses reStructuredText as its markup language. Sphinx draws from
|
||||
the parsing and translating suite, the Docutils.
|
||||
|
||||
This package contains the documentation for Sphinx.
|
||||
|
||||
%package -n python-Sphinx-doc-man
|
||||
Summary: Man files for python-Sphinx
|
||||
Group: Documentation/Man
|
||||
Requires: python3-Sphinx = %{version}
|
||||
Supplements: python3-Sphinx
|
||||
Obsoletes: python-Sphinx-doc-man-common <= %{version}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
|
||||
%description -n python-Sphinx-doc-man
|
||||
Sphinx is a tool that facilitates creating documentation for Python
|
||||
projects (or other documents consisting of multiple reStructuredText
|
||||
sources).
|
||||
|
||||
This package contains the manual pages for the Sphinx executables.
|
||||
|
||||
%package -n python-Sphinx-doc-html
|
||||
Summary: HTML Documentation for python-Sphinx
|
||||
Group: Documentation/HTML
|
||||
Provides: python-Sphinx-doc-html = %{version}
|
||||
|
||||
%description -n python-Sphinx-doc-html
|
||||
Sphinx is a tool that facilitates creating documentation for Python
|
||||
projects (or other documents consisting of multiple reStructuredText
|
||||
sources).
|
||||
|
||||
This package contains the HTML documentation for Sphinx.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n sphinx-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%if %{with test}
|
||||
mkdir build.doc
|
||||
|
||||
cp %{SOURCE2} doc/python3.inv
|
||||
cp %{SOURCE3} doc/requests.inv
|
||||
cp %{SOURCE4} doc/readthedocs.inv
|
||||
%{python_expand # Use one bundled intersphinx inventory for all flavors.
|
||||
# The python3.6 inventory fails to build even in its own flavor.
|
||||
# Use a more recent default (currently 3.9) from the source tag instead.
|
||||
# The same for requests.
|
||||
sed -i -e "s/\((.https:..docs.python.org.3.., \)None\()\)/\1'python3.inv'\2/g" doc/conf.py
|
||||
sed -i -e "s/\((.https:..requests.readthedocs.io.*, \)None\()\)/\1'requests.inv'\2/g" doc/conf.py
|
||||
sed -i -e "s/\((.https:..docs.readthedocs.io.*, \)None\()\)/\1'readthedocs.inv'\2/g" doc/conf.py
|
||||
# rm build/sphinx/html/.buildinfo
|
||||
$python -m sphinx -b man -j auto ./doc ./build.doc/man
|
||||
$python -m sphinx -b html -j auto ./doc ./build.doc/html
|
||||
}
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if ! %{with test}
|
||||
%pyproject_install
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/sphinx-apidoc
|
||||
%python_clone -a %{buildroot}%{_bindir}/sphinx-autogen
|
||||
%python_clone -a %{buildroot}%{_bindir}/sphinx-build
|
||||
%python_clone -a %{buildroot}%{_bindir}/sphinx-quickstart
|
||||
%python_group_libalternatives sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart
|
||||
|
||||
%python_expand mkdir -p %{buildroot}%{$python_sitelib}/sphinxcontrib
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
# gh#openSUSE/python-rpm-macros#74
|
||||
%{!?python_find_lang: %define python_find_lang() \
|
||||
%find_lang %{**} \
|
||||
langfile=%{?2}%{!?2:%1.lang} \
|
||||
%{python_expand # \
|
||||
grep -v 'python.*site-packages' ${langfile} > %{$python_prefix}-${langfile} \
|
||||
grep -F %{$python_sitelib} ${langfile} >> %{$python_prefix}-${langfile} \
|
||||
} \
|
||||
}
|
||||
%python_find_lang sphinx
|
||||
|
||||
# libalternatives binaries break the kernel script for determining the Sphinx version
|
||||
sed -i 's/import sys/import sys; sys.argv[0] = "sphinx-build"/' %{buildroot}%{_bindir}/sphinx-build-*
|
||||
|
||||
%else
|
||||
%if 0%{?suse_version} > 1500
|
||||
mkdir -p %{buildroot}%{_docdir}/python-Sphinx/
|
||||
mv build.doc/html %{buildroot}%{_docdir}/python-Sphinx/
|
||||
rm -rf %{buildroot}%{_docdir}/python-Sphinx/html/_images
|
||||
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
mv build.doc/man/sphinx-all.1 %{buildroot}%{_mandir}/man1/sphinx-all.1
|
||||
mv build.doc/man/sphinx-apidoc.1 %{buildroot}%{_mandir}/man1/sphinx-apidoc.1
|
||||
mv build.doc/man/sphinx-build.1 %{buildroot}%{_mandir}/man1/sphinx-build.1
|
||||
mv build.doc/man/sphinx-quickstart.1 %{buildroot}%{_mandir}/man1/sphinx-quickstart.1
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Always deduplicate
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if ! %{with test}
|
||||
%post
|
||||
%python_install_alternative sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart
|
||||
:
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative sphinx-apidoc
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative sphinx-apidoc
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
export PYTHONPATH=.
|
||||
export LC_ALL="C.utf8"
|
||||
# test_latex_images test downloading a remote image
|
||||
# test_signature_annotations doesn’t work
|
||||
%pytest tests -k 'not (linkcheck or test_latex_images or test_signature_annotations or test_copy_images or test_ext_imgconverter)'
|
||||
%endif
|
||||
|
||||
%if ! %{with test}
|
||||
%files %{python_files} -f %{python_prefix}-sphinx.lang
|
||||
%license LICENSE.rst
|
||||
%doc CHANGES.rst README.rst
|
||||
%python_alternative %{_bindir}/sphinx-apidoc
|
||||
%python_alternative %{_bindir}/sphinx-autogen
|
||||
%python_alternative %{_bindir}/sphinx-build
|
||||
%python_alternative %{_bindir}/sphinx-quickstart
|
||||
%{python_sitelib}/sphinx/
|
||||
%exclude %{python_sitelib}/sphinx/texinputs/
|
||||
%dir %{python_sitelib}/sphinx-%{version}.dist-info
|
||||
%{python_sitelib}/sphinx-%{version}.dist-info/*
|
||||
%dir %{python_sitelib}/sphinxcontrib
|
||||
|
||||
%files %{python_files latex}
|
||||
%license LICENSE.rst
|
||||
%{python_sitelib}/sphinx/texinputs/
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%if 0%{?suse_version} > 1500
|
||||
%files -n python-Sphinx-doc-man
|
||||
%license LICENSE.rst
|
||||
%{_mandir}/man1/sphinx-all.1%{?ext_man}
|
||||
%{_mandir}/man1/sphinx-apidoc.1%{?ext_man}
|
||||
%{_mandir}/man1/sphinx-build.1%{?ext_man}
|
||||
%{_mandir}/man1/sphinx-quickstart.1%{?ext_man}
|
||||
|
||||
%files -n python-Sphinx-doc-html
|
||||
%license LICENSE.rst
|
||||
%dir %{_docdir}/python-Sphinx/
|
||||
%{_docdir}/python-Sphinx/html/
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
3
python3.inv
Normal file
3
python3.inv
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:598ad1ec233664ebd19d2e703bedb6832c0bc2cf47ae07b6d5c44dc814d02bda
|
||||
size 138527
|
||||
3
readthedocs.inv
Normal file
3
readthedocs.inv
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3508dae5ee03891797df9df88cbc9c580f0a543eac4f90e1948943fec0dbab17
|
||||
size 26715
|
||||
BIN
requests.inv
Normal file
BIN
requests.inv
Normal file
Binary file not shown.
BIN
sphinx-8.2.3.tar.gz
(Stored with Git LFS)
Normal file
BIN
sphinx-8.2.3.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
40
typing.patch
Normal file
40
typing.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From e01e42f5fc738815b8499c4ede30c6caf130f0a4 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
|
||||
Date: Wed, 19 Mar 2025 20:11:35 +0000
|
||||
Subject: [PATCH] Fix ``INVALID_BUILTIN_CLASSES`` test for Python 3.14.0a6+
|
||||
|
||||
---
|
||||
tests/test_util/test_util_typing.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_util/test_util_typing.py b/tests/test_util/test_util_typing.py
|
||||
index 35ee240f7b8..8a561c378ed 100644
|
||||
--- a/tests/test_util/test_util_typing.py
|
||||
+++ b/tests/test_util/test_util_typing.py
|
||||
@@ -205,7 +205,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||
zipfile.Path,
|
||||
zipfile.CompleteDirs,
|
||||
)
|
||||
- if sys.version_info[:2] >= (3, 13):
|
||||
+ if sys.version_info[:2] == (3, 13):
|
||||
invalid_types += (
|
||||
# pathlib
|
||||
Path,
|
||||
@@ -217,7 +217,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||
)
|
||||
|
||||
invalid_names = {(cls.__module__, cls.__qualname__) for cls in invalid_types}
|
||||
- if sys.version_info[:2] < (3, 13):
|
||||
+ if sys.version_info[:2] != (3, 13):
|
||||
invalid_names |= {
|
||||
('pathlib._local', 'Path'),
|
||||
('pathlib._local', 'PosixPath'),
|
||||
@@ -231,7 +231,7 @@ def test_is_invalid_builtin_class() -> None:
|
||||
('zipfile._path', 'Path'),
|
||||
('zipfile._path', 'CompleteDirs'),
|
||||
}
|
||||
- assert _INVALID_BUILTIN_CLASSES.keys() == invalid_names
|
||||
+ assert set(_INVALID_BUILTIN_CLASSES) == invalid_names
|
||||
|
||||
|
||||
def test_restify_type_hints_containers():
|
||||
5
update-intersphinx.sh
Normal file
5
update-intersphinx.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
wget https://docs.python.org/3/objects.inv -O python3.inv
|
||||
wget https://requests.readthedocs.io/en/stable/objects.inv -O requests.inv
|
||||
wget https://docs.readthedocs.io/en/stable/objects.inv -O readthedocs.inv
|
||||
Reference in New Issue
Block a user