Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc09b9e79 | ||
|
|
f0f09a5087 | ||
|
|
cc7f8dfbf3 | ||
|
|
924f1b1e38 | ||
|
|
0453f9e3b7 | ||
|
|
eb75429039 | ||
|
|
d76c73ce9e | ||
|
|
04e7c13b7b | ||
|
|
1376b3f859 | ||
|
|
25af7978b4 | ||
|
|
2fb9084204 | ||
|
|
12770577f7 | ||
|
|
4459819cfc | ||
|
|
5c12b53641 | ||
|
|
f7572144d2 | ||
|
|
4500554943 | ||
|
|
82817e3a80 | ||
|
|
daad1311b1 | ||
|
|
67bdc19f10 | ||
|
|
bcde98f61b | ||
|
|
9e608a0fa5 | ||
|
|
976a71363d | ||
|
|
5bf9c06479 | ||
|
|
884ff2afc1 | ||
|
|
1d11fd11e2 | ||
|
|
39005de2f4 | ||
|
|
686ccb777b | ||
|
|
e4c8578188 | ||
|
|
95033b7db0 | ||
|
|
1a1e29e5a8 | ||
|
|
19463ebbdd | ||
|
|
23b5cdf21e | ||
|
|
7afb2d61aa | ||
|
|
d237e99bb9 | ||
|
|
bf5a2d48d8 | ||
|
|
63a8f7aefb | ||
|
|
153c8a4054 | ||
|
|
3a5b12f688 | ||
|
|
fea4d52ef1 | ||
|
|
a42c28ce7c | ||
|
|
92839f3f56 | ||
|
|
a06c535b39 | ||
|
|
8c43a53ed7 | ||
|
|
e85e617e78 | ||
|
|
90754897ab | ||
|
|
dbb50a5e0f | ||
|
|
833015ffe7 | ||
|
|
7cdc32e4ae | ||
|
|
d1c43fc658 | ||
|
|
016c639951 | ||
|
|
bd7e5f534f | ||
|
|
d38712d2c8 | ||
|
|
de4211c65d | ||
|
|
26b3d1a440 | ||
|
|
644e00c17b | ||
|
|
9622ed923e | ||
|
|
10b412f00c | ||
|
|
88b03eafc5 | ||
|
|
334b5cd671 | ||
|
|
6a162ce61a | ||
|
|
80327ebb05 | ||
|
|
b037848b60 | ||
|
|
46248b49f8 | ||
|
|
6947effe2b | ||
|
|
74c8514689 | ||
|
|
da1eff5e26 | ||
|
|
baac7bad24 | ||
|
|
9e75ecd41f | ||
|
|
61f25030e6 | ||
|
|
3d9a6101c9 | ||
|
|
8e40c34f4a |
21
.gitignore
vendored
21
.gitignore
vendored
@@ -11,3 +11,24 @@
|
||||
/Sphinx-1.6.4.tar.gz
|
||||
/Sphinx-1.6.5.tar.gz
|
||||
/Sphinx-1.6.6.tar.gz
|
||||
/Sphinx-1.7.1.tar.gz
|
||||
/Sphinx-1.7.2.tar.gz
|
||||
/Sphinx-1.7.5.tar.gz
|
||||
/Sphinx-1.7.6.tar.gz
|
||||
/Sphinx-1.8.4.tar.gz
|
||||
/Sphinx-2.0.0b1.tar.gz
|
||||
/Sphinx-2.0.0b2.tar.gz
|
||||
/Sphinx-2.0.1.tar.gz
|
||||
/Sphinx-2.1.2.tar.gz
|
||||
/Sphinx-2.2.0.tar.gz
|
||||
/Sphinx-2.2.2.tar.gz
|
||||
/Sphinx-3.1.1.tar.gz
|
||||
/Sphinx-3.1.2.tar.gz
|
||||
/Sphinx-3.2.1.tar.gz
|
||||
/Sphinx-3.3.1.tar.gz
|
||||
/Sphinx-3.4.3.tar.gz
|
||||
/Sphinx-3.5.2.tar.gz
|
||||
/Sphinx-3.5.3.tar.gz
|
||||
/Sphinx-3.5.4.tar.gz
|
||||
/Sphinx-4.0.2.tar.gz
|
||||
/Sphinx-4.1.2.tar.gz
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
Sphinx with autodoc is sensitive to whether it is run via Python2 or Python3
|
||||
as it uses the Python version that it is invoked with to parse the source
|
||||
files for docstrings. Unfortunately, there's no logic to detect this within
|
||||
the sphinx commands and the standard Makefiles generated by sphinx-quickstart
|
||||
don't give the user any hint that it might be a problem.
|
||||
|
||||
The Fedora package tries to mitigate this problem by allowing the user to
|
||||
switch between the Python2 and Python3 versions using environment-modules. To
|
||||
switch to the Python3 commands, use::
|
||||
|
||||
module swap python-sphinx/python3-sphinx
|
||||
|
||||
To switch to the Python2 version, use::
|
||||
|
||||
module swap python-sphinx/python2-sphinx
|
||||
|
||||
The default install uses the python2 version of the modules.
|
||||
If the system administrator wishes to change the default, edit the
|
||||
/etc/profile.d/zz-modules-python-sphinx.sh and
|
||||
/etc/profile.d/zz-modules-python-sphinx.csh files to specify a specific
|
||||
alternative to use. For instance, to make the python3 version the default,
|
||||
modify it like so::
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Add path to the default python-sphinx scripts on this version of Fedora
|
||||
-module load python-sphinx
|
||||
+module load python-sphinx/python3-sphinx
|
||||
@@ -1,2 +0,0 @@
|
||||
#%Module1.0
|
||||
set ModuleVersion "python@PYTHONVER@-sphinx"
|
||||
35
display-typing-objects-correctly-with-Python-310.patch
Normal file
35
display-typing-objects-correctly-with-Python-310.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 648af37d864b5d76bbe833785d664e40d56d9768 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Wed, 11 Aug 2021 01:36:46 +0900
|
||||
Subject: [PATCH] Fix #9537: autodoc: Some typing.* objects are broken
|
||||
|
||||
At the HEAD of 3.10, the implementation of `typing._GenericAlias` has
|
||||
been changed to have correct _name and __name__.
|
||||
---
|
||||
sphinx/util/typing.py | 6 ++++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
|
||||
index f856950bf2..df5277ae7b 100644
|
||||
--- a/sphinx/util/typing.py
|
||||
+++ b/sphinx/util/typing.py
|
||||
@@ -148,7 +148,9 @@ def _restify_py37(cls: Optional[Type]) -> str:
|
||||
args = ', '.join(restify(a) for a in cls.__args__)
|
||||
return ':obj:`~typing.Union`\\ [%s]' % args
|
||||
elif inspect.isgenericalias(cls):
|
||||
- if getattr(cls, '_name', None):
|
||||
+ if isinstance(cls.__origin__, typing._SpecialForm):
|
||||
+ text = restify(cls.__origin__) # type: ignore
|
||||
+ elif getattr(cls, '_name', None):
|
||||
if cls.__module__ == 'typing':
|
||||
text = ':class:`~%s.%s`' % (cls.__module__, cls._name)
|
||||
else:
|
||||
@@ -344,7 +346,7 @@ def _stringify_py37(annotation: Any) -> str:
|
||||
if not isinstance(annotation.__args__, (list, tuple)):
|
||||
# broken __args__ found
|
||||
pass
|
||||
- elif qualname == 'Union':
|
||||
+ elif qualname in ('Optional', 'Union'):
|
||||
if len(annotation.__args__) > 1 and annotation.__args__[-1] is NoneType:
|
||||
if len(annotation.__args__) > 2:
|
||||
args = ', '.join(stringify(a) for a in annotation.__args__[:-1])
|
||||
62
fix-tests-with-pygments-210.patch
Normal file
62
fix-tests-with-pygments-210.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 06ec5b027d01e8f7717e4687f89f335e83545ff9 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Wed, 18 Aug 2021 01:50:08 +0900
|
||||
Subject: [PATCH] Fix test: Tests has been broken with pygments-2.10+
|
||||
|
||||
---
|
||||
tests/test_intl.py | 21 +++++++++++++++++----
|
||||
1 file changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/test_intl.py b/tests/test_intl.py
|
||||
index 7791b4aeed5..e9e7ee9e24b 100644
|
||||
--- a/tests/test_intl.py
|
||||
+++ b/tests/test_intl.py
|
||||
@@ -12,6 +12,7 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
+import pygments
|
||||
import pytest
|
||||
from babel.messages import mofile, pofile
|
||||
from babel.messages.catalog import Catalog
|
||||
@@ -30,6 +31,8 @@
|
||||
},
|
||||
)
|
||||
|
||||
+pygments_version = tuple(int(v) for v in pygments.__version__.split('.'))
|
||||
+
|
||||
|
||||
def read_po(pathname):
|
||||
with pathname.open() as f:
|
||||
@@ -1060,8 +1063,13 @@ def test_additional_targets_should_not_be_translated(app):
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# C code block with lang should not be translated but be *C* highlighted
|
||||
- expected_expr = ("""<span class="cp">#include</span> """
|
||||
- """<span class="cpf"><stdio.h></span>""")
|
||||
+ if pygments_version < (2, 10, 0):
|
||||
+ expected_expr = ("""<span class="cp">#include</span> """
|
||||
+ """<span class="cpf"><stdio.h></span>""")
|
||||
+ else:
|
||||
+ expected_expr = ("""<span class="cp">#include</span>"""
|
||||
+ """<span class="w"> </span>"""
|
||||
+ """<span class="cpf"><stdio.h></span>""")
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# literal block in list item should not be translated
|
||||
@@ -1138,8 +1146,13 @@ def test_additional_targets_should_be_translated(app):
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# C code block with lang should be translated and be *C* highlighted
|
||||
- expected_expr = ("""<span class="cp">#include</span> """
|
||||
- """<span class="cpf"><STDIO.H></span>""")
|
||||
+ if pygments_version < (2, 10, 0):
|
||||
+ expected_expr = ("""<span class="cp">#include</span> """
|
||||
+ """<span class="cpf"><STDIO.H></span>""")
|
||||
+ else:
|
||||
+ expected_expr = ("""<span class="cp">#include</span>"""
|
||||
+ """<span class="w"> </span>"""
|
||||
+ """<span class="cpf"><STDIO.H></span>""")
|
||||
assert_count(expected_expr, result, 1)
|
||||
|
||||
# literal block in list item should be translated
|
||||
36
generate-correct-reference-to-parent-class.patch
Normal file
36
generate-correct-reference-to-parent-class.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From d0c97e9eb57126e38b7b018a101df1ecb1ad12b8 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Sat, 31 Jul 2021 01:41:35 +0900
|
||||
Subject: [PATCH] Fix #9504: autodoc: generate incorrect reference to the
|
||||
parent class
|
||||
|
||||
Autodoc generates incorrect references to the parent class the target
|
||||
class inherites the class having `_name` attribute. It conciders the
|
||||
parent is a kind of SpecialForm'ed class by mistake. This uses
|
||||
`isinstance(X, SpecialForm)` to check that.
|
||||
|
||||
Note: SpecialForm became a class since Python 3.7.
|
||||
---
|
||||
CHANGES | 2 ++
|
||||
sphinx/util/typing.py | 8 ++------
|
||||
2 files changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
|
||||
index 012d32e524..f856950bf2 100644
|
||||
--- a/sphinx/util/typing.py
|
||||
+++ b/sphinx/util/typing.py
|
||||
@@ -171,12 +171,8 @@ def _restify_py37(cls: Optional[Type]) -> str:
|
||||
text += r"\ [%s]" % ", ".join(restify(a) for a in cls.__args__)
|
||||
|
||||
return text
|
||||
- elif hasattr(cls, '_name'):
|
||||
- # SpecialForm
|
||||
- if cls.__module__ == 'typing':
|
||||
- return ':obj:`~%s.%s`' % (cls.__module__, cls._name)
|
||||
- else:
|
||||
- return ':obj:`%s.%s`' % (cls.__module__, cls._name)
|
||||
+ elif isinstance(cls, typing._SpecialForm):
|
||||
+ return ':obj:`~%s.%s`' % (cls.__module__, cls._name)
|
||||
elif hasattr(cls, '__qualname__'):
|
||||
if cls.__module__ == 'typing':
|
||||
return ':class:`~%s.%s`' % (cls.__module__, cls.__qualname__)
|
||||
@@ -1,141 +1,125 @@
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 1
|
||||
# When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport
|
||||
# Without it we have warnings in docs, but it's not a hard dependency
|
||||
%bcond_without websupport
|
||||
# Also, we don't have all the tests requirements
|
||||
%bcond_without tests
|
||||
|
||||
# Unset -s on python shebang to allow RPM-installed sphinx to be used
|
||||
# with user-installed modules (#1903763)
|
||||
%global py3_shebang_flags %nil
|
||||
|
||||
# No internet in Koji
|
||||
%bcond_with internet
|
||||
|
||||
%if 0%{?rhel} > 7
|
||||
# Build without BuildRequires ImageMagick, to skip imgconverter tests
|
||||
%bcond_with imagemagick_tests
|
||||
%else
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%bcond_without imagemagick_tests
|
||||
%endif
|
||||
|
||||
# Currently, python2 version is always the default: https://fedoraproject.org/wiki/Packaging:Python#Naming
|
||||
%if 1
|
||||
%global py3_default 0
|
||||
%else
|
||||
%global py3_default 1
|
||||
%endif
|
||||
# During texlive updates, sometimes the latex environment is unstable
|
||||
%bcond_without latex_tests
|
||||
|
||||
%global upstream_name Sphinx
|
||||
|
||||
Name: python-sphinx
|
||||
Version: 1.6.6
|
||||
Release: 1%{?dist}
|
||||
%global general_version 4.1.2
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Python documentation generator
|
||||
|
||||
Group: Development/Tools
|
||||
|
||||
# Unless otherwise noted, the license for code is BSD
|
||||
# sphinx/util/stemmer.py Public Domain
|
||||
# sphinx/pycode/pgen2 Python
|
||||
# jquery (MIT or GPLv2)
|
||||
License: BSD and Public Domain and Python and (MIT or GPLv2)
|
||||
URL: http://sphinx-doc.org/
|
||||
Source0: https://files.pythonhosted.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
|
||||
Source1: python2-sphinx
|
||||
Source2: python3-sphinx
|
||||
Source3: zz-modules-python-sphinx.sh
|
||||
Source4: zz-modules-python-sphinx.csh
|
||||
Source5: README.fedora
|
||||
# environment-modules file to select whether the py2 or py3 version of
|
||||
# python-sphinx execuitables is default
|
||||
Source6: default-sphinx-command.in
|
||||
# sphinx/util/inspect.py has bits licensed with PSF license v2 (Python)
|
||||
# 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
|
||||
|
||||
# Make the test_latex_remote_images an expected failure
|
||||
# since it requires an active internet connection
|
||||
# to fetch images, which is not possible in koji or mock.
|
||||
Patch0: xfail-test_latex_remote_images.patch
|
||||
URL: https://www.sphinx-doc.org/
|
||||
Source0: %{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
|
||||
# `types.Union` was renamed to `types.UnionType` on the HEAD of Python 3.10
|
||||
# (refs: python/cpython#27342). Afterwars, sphinx-build crashes because of ImportError
|
||||
# Merged upstream: https://github.com/sphinx-doc/sphinx/pull/9513
|
||||
Patch2: rename-types-Union-to-types-UnionType.patch
|
||||
# Fix test failures with python-pygments 2.10+
|
||||
# https://github.com/sphinx-doc/sphinx/pull/9557
|
||||
Patch3: fix-tests-with-pygments-210.patch
|
||||
# Some objects under ``typing`` module are not displayed well
|
||||
# with the HEAD of Python 3.10.0rc2+
|
||||
# Merged upstream: https://github.com/sphinx-doc/sphinx/pull/9538
|
||||
Patch4: display-typing-objects-correctly-with-Python-310.patch
|
||||
# Render typing.Annotated correctly with Python 3.10
|
||||
# Merged upstream: https://github.com/sphinx-doc/sphinx/pull/9590
|
||||
Patch5: render-typing-Annotated-correctly-with-Python-3.10.patch
|
||||
# Generate correct reference to the parent class
|
||||
# Merged upstream: https://github.com/sphinx-doc/sphinx/pull/9515/
|
||||
Patch6: generate-correct-reference-to-parent-class.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel >= 2.4
|
||||
BuildRequires: python2-babel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-docutils
|
||||
BuildRequires: python2-jinja2
|
||||
BuildRequires: python2-pygments >= 2.0
|
||||
BuildRequires: python2-six
|
||||
BuildRequires: python2-sphinx_rtd_theme
|
||||
BuildRequires: python2-sphinx-theme-alabaster
|
||||
BuildRequires: python2-imagesize
|
||||
BuildRequires: python2-requests
|
||||
BuildRequires: python2-typing
|
||||
BuildRequires: python2-sphinxcontrib-websupport
|
||||
BuildRequires: environment(modules)
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
|
||||
%if %{with websupport}
|
||||
BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
|
||||
%endif
|
||||
|
||||
# for fixes
|
||||
BuildRequires: dos2unix
|
||||
|
||||
# for testing
|
||||
BuildRequires: python2-nose
|
||||
BuildRequires: python2-pytest
|
||||
BuildRequires: python2-pytest-cov
|
||||
%if %{with tests}
|
||||
# tests import _testcapi
|
||||
BuildRequires: python%{python3_pkgversion}-test
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gettext
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: python2-sqlalchemy
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-simplejson
|
||||
BuildRequires: python2-html5lib
|
||||
BuildRequires: python2-whoosh
|
||||
BuildRequires: python2-snowballstemmer
|
||||
BuildRequires: python2-enum34
|
||||
BuildRequires: texinfo
|
||||
|
||||
%if %{with imagemagick_tests}
|
||||
BuildRequires: ImageMagick
|
||||
# note: no Python3 xapian binding yet
|
||||
BuildRequires: python2-xapian
|
||||
%endif
|
||||
|
||||
%if %{with latex_tests}
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
BuildRequires: texlive-collection-latex
|
||||
BuildRequires: texlive-dvipng
|
||||
BuildRequires: texlive-dvisvgm
|
||||
BuildRequires: texlive-ucs
|
||||
BuildRequires: tex(cmap.sty)
|
||||
BuildRequires: tex(ecrm1000.tfm)
|
||||
BuildRequires: tex(footnote.sty)
|
||||
BuildRequires: tex(framed.sty)
|
||||
BuildRequires: tex(multirow.sty)
|
||||
BuildRequires: tex(parskip.sty)
|
||||
BuildRequires: tex(titlesec.sty)
|
||||
BuildRequires: tex(threeparttable.sty)
|
||||
BuildRequires: tex(upquote.sty)
|
||||
BuildRequires: tex(wrapfig.sty)
|
||||
BuildRequires: tex(capt-of.sty)
|
||||
BuildRequires: tex(needspace.sty)
|
||||
BuildRequires: tex(eqparbox.sty)
|
||||
BuildRequires: tex(amsmath.sty)
|
||||
BuildRequires: tex(amsthm.sty)
|
||||
BuildRequires: tex(amssymb.sty)
|
||||
BuildRequires: tex(amsfonts.sty)
|
||||
BuildRequires: tex(bm.sty)
|
||||
BuildRequires: tex(palatino.sty)
|
||||
BuildRequires: tex(multirow.sty)
|
||||
BuildRequires: tex(eqparbox.sty)
|
||||
BuildRequires: tex(atbegshi.sty)
|
||||
BuildRequires: tex(anyfontsize.sty)
|
||||
BuildRequires: tex(luatex85.sty)
|
||||
BuildRequires: tex(fncychap.sty)
|
||||
BuildRequires: tex(tabulary.sty)
|
||||
BuildRequires: tex(polyglossia.sty)
|
||||
BuildRequires: tex(article.cls)
|
||||
BuildRequires: tex(capt-of.sty)
|
||||
BuildRequires: tex(cmap.sty)
|
||||
BuildRequires: tex(color.sty)
|
||||
BuildRequires: tex(ctablestack.sty)
|
||||
BuildRequires: tex(eu1enc.def)
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-babel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-jinja2
|
||||
BuildRequires: python3-pygments
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-pytest-cov
|
||||
BuildRequires: python3-sqlalchemy
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-simplejson
|
||||
BuildRequires: python3-html5lib
|
||||
BuildRequires: python3-whoosh
|
||||
BuildRequires: python3-snowballstemmer
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-sphinx_rtd_theme
|
||||
BuildRequires: python3-sphinx-theme-alabaster
|
||||
BuildRequires: python3-imagesize
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-sphinxcontrib-websupport
|
||||
%endif # with_python3
|
||||
BuildRequires: tex(fancyhdr.sty)
|
||||
BuildRequires: tex(fancyvrb.sty)
|
||||
BuildRequires: tex(fncychap.sty)
|
||||
BuildRequires: tex(framed.sty)
|
||||
BuildRequires: tex(FreeSerif.otf)
|
||||
BuildRequires: tex(geometry.sty)
|
||||
BuildRequires: tex(hyperref.sty)
|
||||
BuildRequires: tex(kvoptions.sty)
|
||||
BuildRequires: tex(luatex85.sty)
|
||||
BuildRequires: tex(needspace.sty)
|
||||
BuildRequires: tex(parskip.sty)
|
||||
BuildRequires: tex(polyglossia.sty)
|
||||
BuildRequires: tex(tabulary.sty)
|
||||
BuildRequires: tex(titlesec.sty)
|
||||
BuildRequires: tex(upquote.sty)
|
||||
BuildRequires: tex(utf8x.def)
|
||||
BuildRequires: tex(wrapfig.sty)
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
@@ -167,38 +151,18 @@ the Python docs:
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package -n python2-sphinx
|
||||
%package -n python%{python3_pkgversion}-sphinx
|
||||
Summary: Python documentation generator
|
||||
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
||||
Requires: python2-babel
|
||||
Requires: python2-docutils
|
||||
Requires: python2-jinja2
|
||||
Requires: python2-pygments
|
||||
Requires: python2-mock
|
||||
Requires: python2-snowballstemmer
|
||||
Requires: python2-sphinx_rtd_theme
|
||||
Requires: python2-six
|
||||
Requires: python2-sphinx-theme-alabaster
|
||||
Requires: python2-imagesize
|
||||
Requires: python2-requests
|
||||
Requires: python2-typing
|
||||
Requires: python2-sphinxcontrib-websupport
|
||||
Requires: environment(modules)
|
||||
# Needed to get rid of the alternatives config installed in f24 and f25
|
||||
# versions of the package
|
||||
Requires(pre): /usr/sbin/alternatives
|
||||
|
||||
Recommends: graphviz
|
||||
Recommends: ImageMagick
|
||||
Obsoletes: python-sphinx <= 1.2.3
|
||||
Obsoletes: python-sphinxcontrib-napoleon < 0.5
|
||||
Provides: python-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
||||
Obsoletes: python2-Sphinx <= 1.3.1-4
|
||||
Provides: python2-Sphinx = %{?epoch}:%{version}-%{release}
|
||||
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-sphinx}
|
||||
Conflicts: python3-sphinx < %{?epoch}:%{version}-%{release}
|
||||
|
||||
%description -n python2-sphinx
|
||||
# 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
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
@@ -227,46 +191,44 @@ the Python docs:
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
|
||||
|
||||
%package latex
|
||||
Summary: LaTeX builder dependencies for %{name}
|
||||
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
%package -n python%{python3_pkgversion}-sphinx-latex
|
||||
Summary: LaTeX builder dependencies for python%{python3_pkgversion}-sphinx
|
||||
|
||||
Requires: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
||||
Requires: texlive-collection-fontsrecommended
|
||||
Requires: texlive-collection-latex
|
||||
Requires: texlive-dvipng
|
||||
Requires: texlive-dvisvgm
|
||||
Requires: texlive-ucs
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(ecrm1000.tfm)
|
||||
Requires: tex(footnote.sty)
|
||||
Requires: tex(framed.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(threeparttable.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(wrapfig.sty)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(amsmath.sty)
|
||||
Requires: tex(amsthm.sty)
|
||||
Requires: tex(amssymb.sty)
|
||||
Requires: tex(amsfonts.sty)
|
||||
Requires: tex(bm.sty)
|
||||
Requires: tex(palatino.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(atbegshi.sty)
|
||||
Requires: tex(anyfontsize.sty)
|
||||
Requires: tex(luatex85.sty)
|
||||
Requires: tex(fncychap.sty)
|
||||
Requires: tex(tabulary.sty)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(article.cls)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(color.sty)
|
||||
Requires: tex(ctablestack.sty)
|
||||
Requires: tex(eu1enc.def)
|
||||
Obsoletes: python3-sphinx-latex < 1.4.4-2
|
||||
Requires: tex(fancyhdr.sty)
|
||||
Requires: tex(fancyvrb.sty)
|
||||
Requires: tex(fncychap.sty)
|
||||
Requires: tex(framed.sty)
|
||||
Requires: tex(FreeSerif.otf)
|
||||
Requires: tex(geometry.sty)
|
||||
Requires: tex(hyperref.sty)
|
||||
Requires: tex(kvoptions.sty)
|
||||
Requires: tex(luatex85.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(polyglossia.sty)
|
||||
Requires: tex(tabulary.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(wrapfig.sty)
|
||||
|
||||
%description latex
|
||||
# No files in this package, automatic provides don't work:
|
||||
%py_provides python%{python3_pkgversion}-sphinx-latex
|
||||
|
||||
%description -n python%{python3_pkgversion}-sphinx-latex
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
@@ -278,70 +240,10 @@ This package pulls in the TeX dependencies needed by Sphinx's LaTeX
|
||||
builder.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-sphinx
|
||||
Summary: Python documentation generator
|
||||
Group: Development/Tools
|
||||
Requires: python-sphinx-locale = %{?epoch}:%{version}-%{release}
|
||||
Requires: python3-babel
|
||||
Requires: python3-docutils
|
||||
Requires: python3-jinja2
|
||||
Requires: python3-pygments
|
||||
Requires: python3-mock
|
||||
Requires: python3-snowballstemmer
|
||||
Requires: python3-sphinx_rtd_theme
|
||||
Requires: python3-sphinx-theme-alabaster
|
||||
Requires: python3-imagesize
|
||||
Requires: python3-requests
|
||||
Requires: python3-six
|
||||
Requires: python3-sphinxcontrib-websupport
|
||||
Recommends: graphviz
|
||||
Recommends: ImageMagick
|
||||
Requires: environment(modules)
|
||||
# Needed to get rid of the alternatives config installed in f24 and f25
|
||||
# versions of the package
|
||||
Requires(pre): /usr/sbin/alternatives
|
||||
Obsoletes: python3-sphinxcontrib-napoleon < 0.3.0
|
||||
Provides: python3-sphinxcontrib-napoleon = %{?epoch}:%{version}-%{release}
|
||||
Provides: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-sphinx}
|
||||
Conflicts: python2-Sphinx < %{?epoch}:%{version}-%{release}
|
||||
|
||||
%description -n python3-sphinx
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
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.
|
||||
|
||||
Sphinx uses reStructuredText as its markup language, and many of its
|
||||
strengths come from the power and straightforwardness of
|
||||
reStructuredText and its parsing and translating suite, the Docutils.
|
||||
|
||||
Although it is still under constant development, the following
|
||||
features are already present, work fine and can be seen "in action" in
|
||||
the Python docs:
|
||||
|
||||
* Output formats: HTML (including Windows HTML Help) and LaTeX,
|
||||
for printable PDF versions
|
||||
* Extensive cross-references: semantic markup and automatic links
|
||||
for functions, classes, glossary terms and similar pieces of
|
||||
information
|
||||
* Hierarchical structure: easy definition of a document tree, with
|
||||
automatic links to siblings, parents and children
|
||||
* Automatic indices: general index as well as a module index
|
||||
* Code handling: automatic highlighting using the Pygments highlighter
|
||||
* Various extensions are available, e.g. for automatic testing of
|
||||
snippets and inclusion of appropriately formatted docstrings.
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
License: BSD
|
||||
Requires: python(Sphinx) = %{?epoch}:%{version}-%{release}
|
||||
Recommends: python%{python3_pkgversion}-sphinx = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
@@ -354,116 +256,74 @@ useful to many other projects.
|
||||
This package contains documentation in reST and HTML formats.
|
||||
|
||||
|
||||
%package locale
|
||||
Summary: Locale files for %{name}
|
||||
Group: Development/Tools
|
||||
License: BSD
|
||||
|
||||
%description locale
|
||||
Sphinx is a tool that makes it easy to create intelligent and
|
||||
beautiful documentation for Python projects (or other documents
|
||||
consisting of multiple reStructuredText sources), written by Georg
|
||||
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 locale files for Sphinx
|
||||
|
||||
%prep
|
||||
%autosetup -n %{upstream_name}-%{version}%{?prerel} -p1
|
||||
|
||||
cp %{SOURCE5} .
|
||||
|
||||
sed '1d' -i sphinx/pycode/pgen2/token.py
|
||||
%autosetup -n %{upstream_name}-%{upstream_version} -p1
|
||||
|
||||
# fix line encoding of bundled jquery.js
|
||||
dos2unix -k ./sphinx/themes/basic/static/jquery.js
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
%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
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r %{?with_tests:-x test}
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif # with_python3
|
||||
%pyproject_wheel
|
||||
|
||||
export PYTHONPATH=$PWD
|
||||
pushd doc
|
||||
make html
|
||||
make man
|
||||
export SPHINXBUILD="%{python3} ../sphinx/cmd/build.py"
|
||||
make html SPHINXBUILD="$SPHINXBUILD"
|
||||
make man SPHINXBUILD="$SPHINXBUILD"
|
||||
rm -rf _build/html/.buildinfo
|
||||
mv _build/html ..
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
install -d %{buildroot}%{_libexecdir}/python3-sphinx
|
||||
%pyproject_install
|
||||
|
||||
# For backwards compatibility. Remove with care, if at all
|
||||
for i in sphinx-{apidoc,autogen,build,quickstart}; do
|
||||
mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
|
||||
ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3
|
||||
ln -s %{_bindir}/$i-3 %{buildroot}%{_libexecdir}/python3-sphinx/$i
|
||||
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
|
||||
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3
|
||||
done
|
||||
|
||||
# These appear to be incomplete C extensions to speed up parsing. They are not
|
||||
# built by setup.py yet. Removing them in %%install so that if sphinx does
|
||||
# make use of them, and we don't notice, we only remove these source files
|
||||
# after the build has created the .so's
|
||||
rm %{buildroot}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
|
||||
%endif # with_python3
|
||||
|
||||
%py2_install
|
||||
install -d %{buildroot}%{_libexecdir}/python2-sphinx
|
||||
for i in sphinx-{apidoc,autogen,build,quickstart}; do
|
||||
mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python2_version}
|
||||
ln -s $i-%{python2_version} %{buildroot}%{_bindir}/$i-2
|
||||
ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-sphinx/$i
|
||||
done
|
||||
|
||||
# These appear to be incomplete C extensions to speed up parsing. They are not
|
||||
# built by setup.py yet. Removing them in %%install so that if sphinx does
|
||||
# make use of them, and we don't notice, we only remove these source files
|
||||
# after the build has created the .so's
|
||||
rm %{buildroot}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
|
||||
# Clean up non-python files
|
||||
rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
|
||||
rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
|
||||
|
||||
pushd doc
|
||||
# Deliver man pages
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
for f in _build/man/sphinx-*.1;
|
||||
do
|
||||
### TODO: these are all the same. Do we really need to ship them three
|
||||
### times or is it fine to just ship them as e.g. sphinx-build.1
|
||||
cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f)
|
||||
cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python2_version}.1|")
|
||||
cp -p $f %{buildroot}%{_mandir}/man1/$(basename $f | sed -e "s|.1$|-%{python3_version}.1|")
|
||||
done
|
||||
|
||||
# Remove language files, they're identical to the ones from the
|
||||
# Python 2 build that will be moved to /usr/share below
|
||||
find %{buildroot}%{python3_sitelib}/sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -exec rm -rf '{}' \;
|
||||
popd
|
||||
|
||||
# Clean up non-python files
|
||||
rm -f %{buildroot}%{python2_sitelib}/sphinx/locale/.DS_Store
|
||||
rm -rf %{buildroot}%{python2_sitelib}/sphinx/locale/.tx
|
||||
rm -f %{buildroot}%{python3_sitelib}/sphinx/locale/.DS_Store
|
||||
rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale/.tx
|
||||
|
||||
# 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}%{python_sitelib}
|
||||
pushd %{buildroot}%{python3_sitelib}
|
||||
|
||||
for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
|
||||
do
|
||||
test $lang == __pycache__ && continue
|
||||
install -d %{buildroot}%{_datadir}/sphinx/locale/$lang
|
||||
install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
|
||||
mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
|
||||
@@ -474,36 +334,9 @@ do
|
||||
done
|
||||
popd
|
||||
|
||||
install -d %{buildroot}%{_modulesdir}/python-sphinx
|
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_modulesdir}/python-sphinx/
|
||||
sed -i 's|@python2_sphinx_dir@|%{_libexecdir}/python2-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python2-sphinx
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_modulesdir}/python-sphinx/
|
||||
sed -i 's|@python3_sphinx_dir@|%{_libexecdir}/python3-sphinx|' %{buildroot}%{_modulesdir}/python-sphinx/python3-sphinx
|
||||
install -d %{buildroot}%{_sysconfdir}/profile.d
|
||||
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
|
||||
install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
|
||||
|
||||
%if %{py3_default}
|
||||
sed 's/@PYTHONVER@/3/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version
|
||||
|
||||
# These symlinks establish a default for when a package is first installed (and
|
||||
# therefore, environment modules is not loaded). The user can immediately
|
||||
# switch them by using module swap python-sphinx/python2-sphinx
|
||||
for filename in sphinx-{build,apidoc,autogen,quickstart} ; do
|
||||
ln -s %{_libexecdir}/python3-sphinx/$filename %{buildroot}%{_bindir}/$filename
|
||||
done
|
||||
|
||||
%else
|
||||
sed 's/@PYTHONVER@/2/' < %{SOURCE6} > %{buildroot}%{_modulesdir}/python-sphinx/.version
|
||||
|
||||
# These symlinks establish a default for when a package is first installed (and
|
||||
# therefore, environment modules is not loaded). The user can immediately
|
||||
# switch them by using module swap python-sphinx/python3-sphinx
|
||||
for filename in sphinx-{build,apidoc,autogen,quickstart} ; do
|
||||
ln -s %{_libexecdir}/python2-sphinx/$filename %{buildroot}%{_bindir}/$filename
|
||||
done
|
||||
|
||||
%endif
|
||||
# Create the sphinxcontrib directory, so we can own it
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1669790 for rationale
|
||||
mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
|
||||
|
||||
%find_lang sphinx
|
||||
|
||||
@@ -514,87 +347,206 @@ done
|
||||
>> sphinx.lang
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
# Currently, all linkcheck tests hit external websites. Since network access
|
||||
# is disabled in koji, we have to disable these.
|
||||
rm tests/test_build_linkcheck.py
|
||||
LANG=en_US.UTF-8 make test
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
# Currently, all linkcheck tests hit external websites. Since network access
|
||||
# is disabled in koji, we have to disable these.
|
||||
rm tests/test_build_linkcheck.py
|
||||
LANG=en_US.UTF-8 PYTHON=python3 make test
|
||||
popd
|
||||
%endif # with_python3
|
||||
# Currently, all linkcheck tests and test_latex_images need internet
|
||||
%pytest \
|
||||
%if %{without internet}
|
||||
-k "not linkcheck and not test_latex_images" \
|
||||
%endif
|
||||
;
|
||||
%endif
|
||||
|
||||
|
||||
%pre -n python2-sphinx
|
||||
# python-sphinx as shipped in an update to f24 and f25 used alternatives. So
|
||||
# we need to clean up the alternatives configuration until at least f27
|
||||
%{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python2_version} || :
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%pre -n python3-sphinx
|
||||
# python-sphinx as shipped in an update to f24 and f25 used alternatives. So
|
||||
# we need to clean up the alternatives configuration until at least f27
|
||||
%{_sbindir}/update-alternatives --remove sphinx-build %{_bindir}/sphinx-build-%{python3_version} || :
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%files latex
|
||||
%license LICENSE
|
||||
|
||||
%files locale -f sphinx.lang
|
||||
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGES EXAMPLES README.rst
|
||||
%{_bindir}/sphinx-*
|
||||
%{python3_sitelib}/sphinx/
|
||||
%dir %{python3_sitelib}/sphinxcontrib/
|
||||
%{python3_sitelib}/Sphinx-%{upstream_version}.dist-info/
|
||||
%dir %{_datadir}/sphinx/
|
||||
%dir %{_datadir}/sphinx/locale
|
||||
%dir %{_datadir}/sphinx/locale/*
|
||||
%{_mandir}/man1/sphinx-*
|
||||
|
||||
%files -n python2-sphinx
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGES EXAMPLES README.rst README.fedora
|
||||
%{_bindir}/sphinx-*-2*
|
||||
%{_bindir}/sphinx-build
|
||||
%{_bindir}/sphinx-apidoc
|
||||
%{_bindir}/sphinx-autogen
|
||||
%{_bindir}/sphinx-quickstart
|
||||
%{python2_sitelib}/sphinx/
|
||||
%{python2_sitelib}/Sphinx-%{version}-py%{python2_version}.egg-info/
|
||||
%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
||||
%{_mandir}/man1/*
|
||||
%{_libexecdir}/python2-sphinx/
|
||||
%{_modulesdir}/python-sphinx/python2-sphinx
|
||||
%if !%{py3_default}
|
||||
%{_modulesdir}/python-sphinx/.version
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python%{python3_pkgversion}-sphinx-latex
|
||||
# empty, this is a metapackage
|
||||
|
||||
%files -n python3-sphinx
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGES EXAMPLES README.rst README.fedora
|
||||
%{_bindir}/sphinx-*-3*
|
||||
%{python3_sitelib}/sphinx/
|
||||
%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
|
||||
%{_mandir}/man1/sphinx-*-%{python3_version}.1*
|
||||
%{_libexecdir}/python3-sphinx/
|
||||
%{_modulesdir}/python-sphinx/python3-sphinx
|
||||
%if %{py3_default}
|
||||
%{_modulesdir}/python-sphinx/.version
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.sh
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/zz-modules-python-sphinx.csh
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc html reST
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Sep 16 2021 Karolina Surma <ksurma@redhat.com> - 1:4.1.2-3
|
||||
- Display typing objects correctly with Python 3.10 (fix FTBFS)
|
||||
- Generate correct reference to parent class if class has `_name` attribute
|
||||
- Enable previously deselected test
|
||||
|
||||
* Wed Aug 18 2021 Karolina Surma <ksurma@redhat.com> - 1:4.1.2-2
|
||||
- Patch python-sphinx to work with python-pygments >=2.10
|
||||
|
||||
* Mon Aug 02 2021 Karolina Surma <ksurma@redhat.com> - 1:4.1.2-1
|
||||
- Update to 4.1.2
|
||||
- Fixes rhbz#1979326
|
||||
- Backport commit to fix python-sphinx with Python 3.10-rc1
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.0.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri Jun 11 2021 Karolina Surma <ksurma@redhat.com> - 1:4.0.2-1
|
||||
- Update to 4.0.2
|
||||
- Fixes rhbz#1948279
|
||||
|
||||
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:3.5.4-3
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1:3.5.4-2
|
||||
- Bootstrap for Python 3.10
|
||||
|
||||
* Mon May 10 2021 Karolina Surma <ksurma@redhat.com> - 1:3.5.4-1
|
||||
- Update to 3.5.4
|
||||
- Fixes rhbz#1949477
|
||||
|
||||
* Thu Apr 01 2021 Karolina Surma <ksurma@redhat.com> - 1:3.5.3-1
|
||||
- Update to 3.5.3
|
||||
- Fixes rhbz#1941161
|
||||
|
||||
* Wed Mar 10 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.5.2-1
|
||||
- Update 3.5.2
|
||||
- Fixes rhbz#1928459
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jan 19 2021 Charalampos Stratakis <cstratak@redhat.com> - 1:3.4.3-1
|
||||
- Update to 3.4.3
|
||||
- Fixes rhbz#1909494
|
||||
|
||||
* Sat Dec 05 2020 Mattia Verga <mattia.verga@protonmail.com> - 1:3.3.1-2
|
||||
- Unset -s from python shebang
|
||||
- Fixes: rhbz#1903763
|
||||
|
||||
* Mon Nov 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.3.1-1
|
||||
- Update to 3.3.1
|
||||
- Fixes: rhbz#1893752
|
||||
|
||||
* Wed Oct 14 2020 Tomas Hrnciar <thrnciar@redhat.com> - 1:3.2.1-2
|
||||
- Backport commit to fix python-sphinx with python-pygments v2.7.1
|
||||
|
||||
* Tue Aug 18 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.2.1-1
|
||||
- Update to 3.2.1
|
||||
- Remove compatibility symbolic links from /usr/libexec/
|
||||
- Fixes rhbz#1867294
|
||||
|
||||
* Fri Aug 07 2020 Miro Hrončok <mhroncok@redhat.com> - 1:3.1.2-1
|
||||
- Update to 3.1.2
|
||||
- Fixes rhbz#1853901
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jun 30 2020 Charalampos Stratakis <cstratak@redhat.com> - 1:3.1.1-1
|
||||
- Update to 3.1.1 (#1783776)
|
||||
|
||||
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-4
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-3
|
||||
- Bootstrap for Python 3.9
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.2.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Tue Dec 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-1
|
||||
- Update to 2.2.2 (rhbz#1743018)
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-6
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-5
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-4
|
||||
- Bootstrap for Python 3.8
|
||||
|
||||
* Thu Aug 15 2019 Richard Shaw <hobbes1069@gmail.com> - 1:2.1.2-3
|
||||
- Rebuild for Python 3.8.
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Jun 23 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.1.2-1
|
||||
- Update to 2.1.2 (#1716158)
|
||||
|
||||
* Wed Apr 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.0.1-1
|
||||
- Update to 2.0.1 (#1697544)
|
||||
- Own the sphinxcontrib directory (#1669790)
|
||||
|
||||
* Wed Mar 27 2019 Charalampos Stratakis <cstratak@redhat.com> - 1:2.0.0~b2-1
|
||||
- Update to 2.0.0b2
|
||||
|
||||
* Wed Feb 27 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.0.0~b1-1
|
||||
- Update to 2.0.0b1
|
||||
- Drop Python 2 package
|
||||
- https://fedoraproject.org/wiki/Changes/Sphinx2
|
||||
|
||||
* Thu Feb 07 2019 Alfredo Moralejo <amoralej@redhat.com> - 1:1.8.4-1
|
||||
- Update to 1.8.4.
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.7.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.6-2
|
||||
- Drop explicit locale setting for python3, use C.UTF-8 for python2
|
||||
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
|
||||
|
||||
* Mon Jul 23 2018 Marcel Plch <mplch@redhat.com> - 1:1.7.6-1
|
||||
- Update to 1.7.6
|
||||
|
||||
* Fri Jul 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-6
|
||||
- Remove unused dependencies on xapian and simplejson
|
||||
|
||||
* Thu Jul 5 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.7.5-5
|
||||
- Add patch to fix build if alabaster theme is installed
|
||||
- Add patch for #1589868
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-4
|
||||
- Enable tests
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-3
|
||||
- Enable websupport
|
||||
|
||||
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.5-2
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.5-1
|
||||
- Update to 1.7.5 (bz#1570451)
|
||||
|
||||
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-5
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-4
|
||||
- Bootstrap for Python 3.7
|
||||
|
||||
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.7.2-3
|
||||
- Bootstrap for Python 3.7
|
||||
|
||||
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-2
|
||||
- Conditionalize the ImageMagick build dependency & tests
|
||||
|
||||
* Wed Apr 11 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.7.2-1
|
||||
- Update to 1.7.2 (bz#1558968)
|
||||
|
||||
* Tue Mar 13 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.7.1-1
|
||||
- Update to 1.7.1 (bz#1534802)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.6.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Tue Jan 09 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.6.6-1
|
||||
- Update to 1.6.6 (bz#1532435)
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#%Module 1.0
|
||||
#
|
||||
# python2-sphinx module for use with 'environment modules' package
|
||||
#
|
||||
conflict python-sphinx
|
||||
prepend-path PATH @python2_sphinx_dir@
|
||||
@@ -1,6 +0,0 @@
|
||||
#%Module 1.0
|
||||
#
|
||||
# python2-sphinx module for use with 'environment modules' package
|
||||
#
|
||||
conflict python-sphinx
|
||||
prepend-path PATH @python3_sphinx_dir@
|
||||
49
rename-types-Union-to-types-UnionType.patch
Normal file
49
rename-types-Union-to-types-UnionType.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
From 8b2031c747e7c7e6b845ee2e3db47de617d33cc6 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Fri, 30 Jul 2021 01:27:38 +0900
|
||||
Subject: [PATCH] Fix #9512: sphinx-build: crashed with the HEAD of Python 3.10
|
||||
|
||||
Recently, `types.Union` was renamed to `types.UnionType` on the HEAD
|
||||
of 3.10 (refs: python/cpython#27342). After this change, sphinx-build
|
||||
has been crashed because of ImportError.
|
||||
---
|
||||
sphinx/util/typing.py | 12 ++++++------
|
||||
1 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
|
||||
index f1723c035a..012d32e524 100644
|
||||
--- a/sphinx/util/typing.py
|
||||
+++ b/sphinx/util/typing.py
|
||||
@@ -33,10 +33,10 @@ def _evaluate(self, globalns: Dict, localns: Dict) -> Any:
|
||||
ref = _ForwardRef(self.arg)
|
||||
return ref._eval_type(globalns, localns)
|
||||
|
||||
-if sys.version_info > (3, 10):
|
||||
- from types import Union as types_Union
|
||||
-else:
|
||||
- types_Union = None
|
||||
+try:
|
||||
+ from types import UnionType # type: ignore # python 3.10 or above
|
||||
+except ImportError:
|
||||
+ UnionType = None
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
@@ -114,7 +114,7 @@ def restify(cls: Optional[Type]) -> str:
|
||||
return ':class:`%s`' % INVALID_BUILTIN_CLASSES[cls]
|
||||
elif inspect.isNewType(cls):
|
||||
return ':class:`%s`' % cls.__name__
|
||||
- elif types_Union and isinstance(cls, types_Union):
|
||||
+ elif UnionType and isinstance(cls, UnionType):
|
||||
if len(cls.__args__) > 1 and None in cls.__args__:
|
||||
args = ' | '.join(restify(a) for a in cls.__args__ if a)
|
||||
return 'Optional[%s]' % args
|
||||
@@ -337,7 +337,7 @@ def _stringify_py37(annotation: Any) -> str:
|
||||
elif hasattr(annotation, '__origin__'):
|
||||
# instantiated generic provided by a user
|
||||
qualname = stringify(annotation.__origin__)
|
||||
- elif types_Union and isinstance(annotation, types_Union): # types.Union (for py3.10+)
|
||||
+ elif UnionType and isinstance(annotation, UnionType): # types.Union (for py3.10+)
|
||||
qualname = 'types.Union'
|
||||
else:
|
||||
# we weren't able to extract the base type, appending arguments would
|
||||
26
render-typing-Annotated-correctly-with-Python-3.10.patch
Normal file
26
render-typing-Annotated-correctly-with-Python-3.10.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From b82d3ef05a75b6dad9679f8746db5ef89785c7c0 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Sun, 29 Aug 2021 15:40:49 +0900
|
||||
Subject: [PATCH] Fix #9589: autodoc: typing.Annotated has wrongly been
|
||||
rendered
|
||||
|
||||
At the HEAD of 3.10, the implementation of `typing.Annotated` has
|
||||
been changed to have __qualname__.
|
||||
---
|
||||
CHANGES | 4 ++--
|
||||
sphinx/util/typing.py | 2 ++
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
|
||||
index df5277ae7b..35f808211b 100644
|
||||
--- a/sphinx/util/typing.py
|
||||
+++ b/sphinx/util/typing.py
|
||||
@@ -306,6 +306,8 @@ def stringify(annotation: Any) -> str:
|
||||
return 'None'
|
||||
elif annotation in INVALID_BUILTIN_CLASSES:
|
||||
return INVALID_BUILTIN_CLASSES[annotation]
|
||||
+ elif str(annotation).startswith('typing.Annotated'): # for py310+
|
||||
+ pass
|
||||
elif (getattr(annotation, '__module__', None) == 'builtins' and
|
||||
getattr(annotation, '__qualname__', None)):
|
||||
return annotation.__qualname__
|
||||
2
sources
2
sources
@@ -1 +1 @@
|
||||
SHA512 (Sphinx-1.6.6.tar.gz) = 5f6a88805b2a032302c70ef59f4ed65fc149feef94ed303d579af67de7297ebd6867481d966d668f5ab00a30238bbfbc09d715582fd74993af230c8e5eede30f
|
||||
SHA512 (Sphinx-4.1.2.tar.gz) = 1fe998de7b8fc47989e186835748b7fb5d0b523db95434515b6af29b56d28372f2f92ab917c27cbed51aa0cad13175eda8bf4fc93a8726eb5e93e9bc6995e457
|
||||
|
||||
12
sphinx-test_theming.diff
Normal file
12
sphinx-test_theming.diff
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -ru Sphinx-1.7.6/tests/test_theming.py Sphinx-1.7.6_patched/tests/test_theming.py
|
||||
--- Sphinx-1.7.6/tests/test_theming.py 2018-07-16 11:24:40.000000000 +0200
|
||||
+++ Sphinx-1.7.6_patched/tests/test_theming.py 2018-07-20 15:17:35.049263077 +0200
|
||||
@@ -31,7 +31,7 @@
|
||||
themes.append('alabaster')
|
||||
|
||||
# test Theme class API
|
||||
- assert set(app.html_themes.keys()) == set(themes)
|
||||
+ assert set(app.html_themes.keys()) >= set(themes)
|
||||
assert app.html_themes['test-theme'] == app.srcdir / 'test_theme' / 'test-theme'
|
||||
assert app.html_themes['ziptheme'] == app.srcdir / 'ziptheme.zip'
|
||||
assert app.html_themes['staticfiles'] == app.srcdir / 'test_theme' / 'staticfiles'
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
|
||||
index 55f48cd..78ccecd 100644
|
||||
--- a/tests/test_build_latex.py
|
||||
+++ b/tests/test_build_latex.py
|
||||
@@ -1009,7 +1009,7 @@ def test_latex_raw_directive(app, status, warning):
|
||||
assert 'HTML: abc ghi' in result
|
||||
assert 'LaTeX: abc def ghi' in result
|
||||
|
||||
-
|
||||
+@pytest.mark.xfail(reason="this test requires internet connection")
|
||||
@pytest.mark.sphinx('latex', testroot='images')
|
||||
def test_latex_remote_images(app, status, warning):
|
||||
app.builder.build_all()
|
||||
@@ -1,2 +0,0 @@
|
||||
# Add path to the default python-sphinx scripts on this version of Fedora
|
||||
module load python-sphinx >& /dev/null
|
||||
@@ -1,2 +0,0 @@
|
||||
# Add path to the default python-sphinx scripts on this version of Fedora
|
||||
module load python-sphinx 2> /dev/null
|
||||
Reference in New Issue
Block a user