14
0
forked from pool/python-Sphinx

- update to 8.2.0:

* #13000: Drop Python 3.10 support.
  * #13044: Remove the internal and undocumented has_equations
    data from the :py:class:`!MathDomain` domain. The
    undocumented :py:meth:`!MathDomain.has_equations` method now
    unconditionally returns True. These are replaced by the
    has_maths_elements key of the page context dict. Patch by
    Adam Turner.
  * #13227: HTML output for sequences of keys in the
    :rst:role:`kbd` role no longer uses a <kbd class="kbd
    compound"> element to wrap the keys and separators, but
    places them directly in the relevant parent node. This means
    that CSS rulesets targeting kbd.compound or .kbd.compound
    will no longer have any effect. Patch by Adam Turner.
  * #13037: Deprecate the SingleHTMLBuilder.fix_refuris method.
    Patch by James Addison.
  * #13083, #13330: Un-deprecate sphinx.util.import_object. Patch
    by Matthias Geier.
  * #13173: Add a new duplicate_declaration warning type, with
    duplicate_declaration.c and duplicate_declaration.cpp
    subtypes. Patch by Julien Lecomte and Adam Turner.
  * #11824: linkcode: Allow extensions to add support for a
    domain by defining the keys that should be present. Patch by
    Nicolas Peugnet.
  * #13144: Add a class option to the :rst:dir:`autosummary`
    directive. Patch by Tim Hoffmann.
  * #13146: Napoleon: Unify the type preprocessing logic to allow
    Google-style docstrings to use the optional and default
    keywords. Patch by Chris Barrick.
  * #13227: Implement the :rst:role:`kbd` role as a SphinxRole.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=278
This commit is contained in:
2025-03-11 12:21:11 +00:00
committed by Git OBS Bridge
commit 59e5ac5644
15 changed files with 5135 additions and 0 deletions

26
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

224
pygments.patch Normal file
View File

@@ -0,0 +1,224 @@
From 5ff3740063c1ac57f17ecd697bcd06cc1de4e75c Mon Sep 17 00:00:00 2001
From: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Date: Mon, 6 Jan 2025 06:56:10 +0000
Subject: [PATCH] Adapt tests for Pygments 2.19
---
tests/test_builders/test_build_html_code.py | 8 +++++++-
tests/test_builders/test_build_latex.py | 9 +++++++--
tests/test_directives/test_directive_code.py | 15 +++++++++++++--
tests/test_extensions/test_ext_viewcode.py | 8 +++++++-
tests/test_highlighting.py | 2 +-
tests/test_intl/test_intl.py | 15 +++++++++++++--
6 files changed, 48 insertions(+), 9 deletions(-)
Index: sphinx-8.1.3/tests/test_builders/test_build_html_code.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_builders/test_build_html_code.py
+++ sphinx-8.1.3/tests/test_builders/test_build_html_code.py
@@ -1,3 +1,4 @@
+import pygments
import pytest
@@ -32,11 +33,16 @@ def test_html_codeblock_linenos_style_in
@pytest.mark.sphinx('html', testroot='reST-code-role')
def test_html_code_role(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span class="w"> </span>'
+ else:
+ sp = ' '
+
app.build()
content = (app.outdir / 'index.html').read_text(encoding='utf8')
common_content = (
- '<span class="k">def</span> <span class="nf">foo</span>'
+ f'<span class="k">def</span>{sp}<span class="nf">foo</span>'
'<span class="p">(</span>'
'<span class="mi">1</span> '
'<span class="o">+</span> '
Index: sphinx-8.1.3/tests/test_builders/test_build_latex.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_builders/test_build_latex.py
+++ sphinx-8.1.3/tests/test_builders/test_build_latex.py
@@ -8,6 +8,7 @@ from pathlib import Path
from shutil import copyfile
from subprocess import CalledProcessError
+import pygments
import pytest
from sphinx.builders.latex import default_latex_documents
@@ -2127,12 +2128,16 @@ def test_latex_container(app):
@pytest.mark.sphinx('latex', testroot='reST-code-role')
def test_latex_code_role(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = r'\PYG{+w}{ }'
+ else:
+ sp = ' '
+
app.build()
content = (app.outdir / 'projectnamenotset.tex').read_text(encoding='utf8')
common_content = (
- r'\PYG{k}{def} '
- r'\PYG{n+nf}{foo}'
+ r'\PYG{k}{def}' + sp + r'\PYG{n+nf}{foo}'
r'\PYG{p}{(}'
r'\PYG{l+m+mi}{1} '
r'\PYG{o}{+} '
Index: sphinx-8.1.3/tests/test_directives/test_directive_code.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_directives/test_directive_code.py
+++ sphinx-8.1.3/tests/test_directives/test_directive_code.py
@@ -2,6 +2,7 @@
import os.path
+import pygments
import pytest
from docutils import nodes
@@ -393,6 +394,11 @@ def test_literal_include_block_start_wit
@pytest.mark.sphinx('html', testroot='directive-code')
def test_literal_include_linenos(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span class="w"> </span>'
+ else:
+ sp = ' '
+
app.build(filenames=[app.srcdir / 'linenos.rst'])
html = (app.outdir / 'linenos.html').read_text(encoding='utf8')
@@ -410,7 +416,7 @@ def test_literal_include_linenos(app):
# :lines: 5-9
assert (
- '<span class="linenos">5</span><span class="k">class</span> '
+ f'<span class="linenos">5</span><span class="k">class</span>{sp}'
'<span class="nc">Foo</span><span class="p">:</span>'
) in html
@@ -560,12 +566,17 @@ def test_code_block_highlighted(app):
@pytest.mark.sphinx('html', testroot='directive-code')
def test_linenothreshold(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span class="w"> </span>'
+ else:
+ sp = ' '
+
app.build(filenames=[app.srcdir / 'linenothreshold.rst'])
html = (app.outdir / 'linenothreshold.html').read_text(encoding='utf8')
# code-block using linenothreshold
assert (
- '<span class="linenos">1</span><span class="k">class</span> '
+ f'<span class="linenos">1</span><span class="k">class</span>{sp}'
'<span class="nc">Foo</span><span class="p">:</span>'
) in html
Index: sphinx-8.1.3/tests/test_extensions/test_ext_viewcode.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_extensions/test_ext_viewcode.py
+++ sphinx-8.1.3/tests/test_extensions/test_ext_viewcode.py
@@ -6,6 +6,7 @@ import re
import shutil
from typing import TYPE_CHECKING
+import pygments
import pytest
if TYPE_CHECKING:
@@ -13,6 +14,11 @@ if TYPE_CHECKING:
def check_viewcode_output(app: SphinxTestApp) -> str:
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span> </span>'
+ else:
+ sp = ' '
+
warnings = re.sub(r'\\+', '/', app.warning.getvalue())
assert re.findall(
r"index.rst:\d+: WARNING: Object named 'func1' not found in include "
@@ -41,7 +47,7 @@ def check_viewcode_output(app: SphinxTes
'<a class="viewcode-back" href="../../index.html#spam.Class1">[docs]</a>\n'
) in result
assert '<span>@decorator</span>\n' in result
- assert '<span>class</span> <span>Class1</span><span>:</span>\n' in result
+ assert f'<span>class</span>{sp}<span>Class1</span><span>:</span>\n' in result
assert '<span> </span><span>&quot;&quot;&quot;</span>\n' in result
assert '<span> this is Class1</span>\n' in result
assert '<span> &quot;&quot;&quot;</span>\n' in result
Index: sphinx-8.1.3/tests/test_highlighting.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_highlighting.py
+++ sphinx-8.1.3/tests/test_highlighting.py
@@ -10,7 +10,7 @@ from pygments.token import Name, Text
from sphinx.highlighting import PygmentsBridge
-if tuple(map(int, pygments.__version__.split('.')))[:2] < (2, 18):
+if tuple(map(int, pygments.__version__.split('.')[:2])) < (2, 18):
from pygments.formatter import Formatter
Formatter.__class_getitem__ = classmethod(lambda cls, name: cls) # type: ignore[attr-defined]
Index: sphinx-8.1.3/tests/test_intl/test_intl.py
===================================================================
--- sphinx-8.1.3.orig/tests/test_intl/test_intl.py
+++ sphinx-8.1.3/tests/test_intl/test_intl.py
@@ -10,6 +10,7 @@ import shutil
import time
from io import StringIO
+import pygments
import pytest
from babel.messages import mofile, pofile
from babel.messages.catalog import Catalog
@@ -1473,6 +1474,11 @@ def test_xml_strange_markup(app):
@pytest.mark.sphinx('html', testroot='intl')
@pytest.mark.test_params(shared_result='test_intl_basic')
def test_additional_targets_should_not_be_translated(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span class="w"> </span>'
+ else:
+ sp = ' '
+
app.build()
# [literalblock.txt]
result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
@@ -1511,7 +1517,7 @@ def test_additional_targets_should_not_b
# doctest block should not be translated but be highlighted
expected_expr = (
"""<span class="gp">&gt;&gt;&gt; </span>"""
- """<span class="kn">import</span> <span class="nn">sys</span> """
+ f"""<span class="kn">import</span>{sp}<span class="nn">sys</span> """
"""<span class="c1"># sys importing</span>"""
)
assert_count(expected_expr, result, 1)
@@ -1556,6 +1562,11 @@ def test_additional_targets_should_not_b
},
)
def test_additional_targets_should_be_translated(app):
+ if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 19):
+ sp = '<span class="w"> </span>'
+ else:
+ sp = ' '
+
app.build()
# [literalblock.txt]
result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
@@ -1605,7 +1616,7 @@ def test_additional_targets_should_be_tr
# doctest block should not be translated but be highlighted
expected_expr = (
"""<span class="gp">&gt;&gt;&gt; </span>"""
- """<span class="kn">import</span> <span class="nn">sys</span> """
+ f"""<span class="kn">import</span>{sp}<span class="nn">sys</span> """
"""<span class="c1"># SYS IMPORTING</span>"""
)
assert_count(expected_expr, result, 1)

4405
python-Sphinx.changes Normal file

File diff suppressed because it is too large Load Diff

99
python-Sphinx.keyring Normal file
View 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
cyR4vuSr1VXmsrXp4WiV4hnVzkHsaFIJEX8CqnXI2ODbRH61UhhzhfvpEQARA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mC+nyZYQUcNBVVy3uqUhP6BQKqDfhc0vEb88LdfOdzkJp
fmjoCrdis0UqAsmVSgjJ5Nq3ZVFtRhJKwc9DcmAgayqLnOI/
=+lXz
-----END PGP PUBLIC KEY BLOCK-----

354
python-Sphinx.spec Normal file
View File

@@ -0,0 +1,354 @@
#
# spec file for package python-Sphinx
#
# Copyright (c) 2025 SUSE LLC
#
# 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"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-Sphinx%{psuffix}
Version: 8.2.0
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
BuildRequires: %{python_module base}
BuildRequires: %{python_module flit-core}
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-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
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-SQLAlchemy >= 0.9
Recommends: python-Sphinx-doc-man
Recommends: python-Whoosh >= 2.0
Suggests: python-sphinx_rtd_theme
BuildArch: noarch
%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}
Requires(post): update-alternatives
Requires(postun): update-alternatives
Supplements: python3-Sphinx
Obsoletes: python-Sphinx-doc-man-common <= %{version}
%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
%setup -q -n sphinx-%{version}
%autopatch -p1
%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_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
%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
%endif
%check
%if %{with test}
export PYTHONPATH=.
export LC_ALL="C.utf8"
# test_latex_images test downloading a remote image
# test_signature_annotations doesnt 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
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:598ad1ec233664ebd19d2e703bedb6832c0bc2cf47ae07b6d5c44dc814d02bda
size 138527

3
readthedocs.inv Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3508dae5ee03891797df9df88cbc9c580f0a543eac4f90e1948943fec0dbab17
size 26715

BIN
requests.inv Normal file

Binary file not shown.

3
sphinx-7.4.5.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4abe5385bf856df094c1e6cadf24a2351b12057be3670b99a12c05a01d209f5
size 8115101

BIN
sphinx-8.0.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

3
sphinx-8.1.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927
size 8184611

3
sphinx-8.2.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b0067853d6e97f3fa87563e3404ebd008fce03525b55b25da90706764da6215
size 8321764

5
update-intersphinx.sh Normal file
View 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