Compare commits

..

53 Commits
f29 ... f35

Author SHA1 Message Date
Karolina Surma
9dc09b9e79 Enable one of previously deselected tests 2021-09-22 12:13:12 +02:00
Karolina Surma
f0f09a5087 Backport bugfixes from upstream 4.1.x branch for compatibility with Python 3.10-rc2 2021-09-22 12:12:55 +02:00
Karolina Surma
cc7f8dfbf3 Fix tests with python-pygments >= 2.10 2021-08-18 12:39:04 +02:00
Karolina Surma
924f1b1e38 Backport a patch to make python-sphinx work with Python 3.10-rc1
types.Union was renamed to types.UnionType, causing Sphinx to crash
2021-08-04 09:56:40 +02:00
Karolina Surma
0453f9e3b7 Update to 4.1.2 2021-08-03 13:53:33 +02:00
Fedora Release Engineering
eb75429039 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 09:36:24 +00:00
Karolina Surma
d76c73ce9e Update to 4.0.2 2021-06-11 13:25:22 +02:00
Python Maint
04e7c13b7b Rebuilt for Python 3.10 2021-06-03 13:18:32 +02:00
Python Maint
1376b3f859 Bootstrap for Python 3.10 2021-06-02 19:11:49 +02:00
Miro Hrončok
25af7978b4 Temporarily skip test_signature_annotations to unblock Python 3.10 rebuild 2021-05-11 10:36:13 +02:00
Karolina Surma
2fb9084204 Update to 3.5.4 2021-05-10 16:19:46 +02:00
Tomas Hrnciar
12770577f7 Enable runtime dependencies when built without tests
Runtime dependencies are currently brought in only when built with tests
as a part of -x option of %pyproject_buildrequires. But they are also needed
when building without tests, because in-tree sphinx is used to build
the documentation.
2021-04-21 12:46:16 +02:00
Karolina Surma
4459819cfc Update to 3.5.3 2021-04-01 10:30:34 +02:00
Charalampos Stratakis
5c12b53641 Update to 3.5.2 2021-03-10 20:26:20 +01:00
Fedora Release Engineering
f7572144d2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 13:30:25 +00:00
Charalampos Stratakis
4500554943 Update to 3.4.3 2021-01-19 12:47:35 +00:00
Tom Stellard
82817e3a80 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 20:01:30 +00:00
Mattia Verga
daad1311b1 Unset -s from python shebang 2020-12-08 11:07:38 +01:00
Miro Hrončok
67bdc19f10 Convert to pyproject macros
This adds an (optional) test dependency on Cython + gcc.
This removes an unused dependency on mock.

Not using %{pyproject_files} because the %install section is a mess.
2020-11-24 21:00:32 +01:00
Miro Hrončok
bcde98f61b Remove old Obsoletes, Provides and Conflicts 2020-11-24 21:00:32 +01:00
Miro Hrončok
9e608a0fa5 Update to 3.3.1 2020-11-23 21:38:34 +01:00
Tomas Hrnciar
976a71363d Backport commit to fix sphinx with latest version of pygments 2020-10-14 10:09:07 +02:00
Miro Hrončok
5bf9c06479 Update to 3.2.1
- Remove compatibility symbolic links from /usr/libexec/
- Use %pytest
2020-08-18 13:30:22 +02:00
Frédéric Pierret (fepitre)
884ff2afc1 spec: replace hardcoded python3
Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
2020-08-10 15:26:10 +00:00
Miro Hrončok
1d11fd11e2 Update to 3.1.2
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1853901
2020-08-08 02:03:30 +02:00
Fedora Release Engineering
39005de2f4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 03:58:57 +00:00
Miro Hrončok
686ccb777b Fix e-mail address in changelog 2020-06-30 18:28:53 +02:00
Charalampos Stratakis
e4c8578188 Update to 3.1.1 (#1783776) 2020-06-30 17:50:11 +02:00
Miro Hrončok
95033b7db0 Reenable latex tests 2020-05-28 20:46:34 +02:00
Miro Hrončok
1a1e29e5a8 Rebuilt for Python 3.9 2020-05-23 09:21:40 +02:00
Miro Hrončok
19463ebbdd Bootstrap for Python 3.9 2020-05-22 19:20:34 +02:00
Miro Hrončok
23b5cdf21e Backport another patch from upstream for Python 3.9 support 2020-05-20 09:58:45 +02:00
Miro Hrončok
7afb2d61aa Skip latex tests
See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ILL6SD5U74RTVPDEK4WU743USLSQCIA3/
2020-05-20 09:58:38 +02:00
Miro Hrončok
d237e99bb9 Fix tests for Python3.9.0a5+
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1829705
2020-05-11 13:19:44 +02:00
Fedora Release Engineering
bf5a2d48d8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 15:25:27 +00:00
Miro Hrončok
63a8f7aefb Stop skipping some tests that used to fail 2019-12-10 18:15:58 +01:00
Miro Hrončok
153c8a4054 Update to 2.2.2 (rhbz#1743018) 2019-12-10 18:00:39 +01:00
Charalampos Stratakis
3a5b12f688 Update to 2.2.0 (rhbz#1743018) 2019-12-10 17:49:04 +01:00
Miro Hrončok
fea4d52ef1 Rebuilt for Python 3.8.0rc1 (#1748018) 2019-10-03 14:31:05 +02:00
Miro Hrončok
a42c28ce7c Deselect test_gettext_definition_terms, test_text_definition_terms 2019-08-16 16:09:54 +02:00
Miro Hrončok
92839f3f56 Rebuilt for Python 3.8 2019-08-16 15:31:19 +02:00
Miro Hrončok
a06c535b39 Bootstrap for Python 3.8 2019-08-15 17:31:12 +02:00
Richard Shaw
8c43a53ed7 Rebuild for Python 3.8. 2019-08-15 01:28:28 -05:00
Fedora Release Engineering
e85e617e78 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 16:23:39 +00:00
Miro Hrončok
90754897ab Update to 2.1.2 (#1716158) 2019-06-23 12:29:55 +02:00
Miro Hrončok
dbb50a5e0f Own the sphinxcontrib directory (#1669790) 2019-04-10 17:29:29 +02:00
Miro Hrončok
833015ffe7 Update to 2.0.1 (#1697544) 2019-04-10 17:25:24 +02:00
Charalampos Stratakis
7cdc32e4ae Update to version 2.0.0b2 2019-03-27 21:40:25 +01:00
Miro Hrončok
d1c43fc658 Update to 2.0.0b1 and remove pyton2-sphinx
https://fedoraproject.org/wiki/Changes/Sphinx2
2019-03-11 14:06:48 +01:00
Alfredo Moralejo
016c639951 Update to 1.8.4 2019-02-13 10:37:15 +01:00
Fedora Release Engineering
bd7e5f534f - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 09:25:25 +00:00
Igor Gnatenko
d38712d2c8 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:42 +01:00
Zbigniew Jędrzejewski-Szmek
de4211c65d Drop explicit locale setting
Python3 now sets unicode locale automatically, this workaround
should not be necessary anymore. For python2, let's use the lighter locale.
2018-11-18 22:08:30 +01:00
15 changed files with 508 additions and 455 deletions

17
.gitignore vendored
View File

@@ -15,3 +15,20 @@
/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

View File

@@ -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

View File

@@ -1,2 +0,0 @@
#%Module1.0
set ModuleVersion "python@PYTHONVER@-sphinx"

View 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])

View 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">&lt;stdio.h&gt;</span>""")
+ if pygments_version < (2, 10, 0):
+ expected_expr = ("""<span class="cp">#include</span> """
+ """<span class="cpf">&lt;stdio.h&gt;</span>""")
+ else:
+ expected_expr = ("""<span class="cp">#include</span>"""
+ """<span class="w"> </span>"""
+ """<span class="cpf">&lt;stdio.h&gt;</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">&lt;STDIO.H&gt;</span>""")
+ if pygments_version < (2, 10, 0):
+ expected_expr = ("""<span class="cp">#include</span> """
+ """<span class="cpf">&lt;STDIO.H&gt;</span>""")
+ else:
+ expected_expr = ("""<span class="cp">#include</span>"""
+ """<span class="w"> </span>"""
+ """<span class="cpf">&lt;STDIO.H&gt;</span>""")
assert_count(expected_expr, result, 1)
# literal block in list item should be translated

View 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__)

View File

@@ -1,8 +1,15 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
# 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
@@ -11,154 +18,108 @@
%bcond_without imagemagick_tests
%endif
# When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport
%bcond_without websupport
# Also, we don't have all the tests requirements
%bcond_without tests
# 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.7.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 python[23]-sphinx-theme-alabaster
# Allow extra themes to exist. We pull in python3-sphinx-theme-alabaster
# which causes that test to fail.
Patch1: sphinx-test_theming.diff
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-packaging
BuildRequires: python2-typing
BuildRequires: make
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pyproject-rpm-macros
%if %{with websupport}
BuildRequires: python2-sphinxcontrib-websupport
BuildRequires: python%{python3_pkgversion}-sphinxcontrib-websupport
%endif
BuildRequires: environment(modules)
# for fixes
BuildRequires: dos2unix
%if %{with tests}
BuildRequires: python2-nose
BuildRequires: python2-pytest
BuildRequires: python2-pytest-cov
# tests import _testcapi
BuildRequires: python%{python3_pkgversion}-test
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: texinfo
BuildRequires: graphviz
BuildRequires: python2-sqlalchemy
BuildRequires: python2-mock
BuildRequires: python2-html5lib
BuildRequires: python2-whoosh
BuildRequires: python2-snowballstemmer
BuildRequires: python2-enum34
BuildRequires: texinfo
%if %{with imagemagick_tests}
BuildRequires: ImageMagick
%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)
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
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-babel
BuildRequires: python3-setuptools
BuildRequires: python3-docutils
BuildRequires: python3-jinja2
BuildRequires: python3-pygments
BuildRequires: python3-six
BuildRequires: python3-sphinx_rtd_theme
BuildRequires: python3-sphinx-theme-alabaster
BuildRequires: python3-packaging
BuildRequires: python3-imagesize
BuildRequires: python3-requests
%if %{with websupport}
BuildRequires: python3-sphinxcontrib-websupport
%endif
%if %{with tests}
BuildRequires: python3-nose
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-sqlalchemy
BuildRequires: python3-mock
BuildRequires: python3-html5lib
BuildRequires: python3-whoosh
BuildRequires: python3-snowballstemmer
%endif
%endif # with_python3
%description
@@ -190,41 +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-packaging
Requires: python2-typing
%if %{with websupport}
Requires: python2-sphinxcontrib-websupport
%endif
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
@@ -253,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
@@ -304,73 +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-packaging
%if %{with websupport}
Requires: python3-sphinxcontrib-websupport
%endif
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
@@ -383,25 +256,8 @@ 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} .
%autosetup -n %{upstream_name}-%{upstream_version} -p1
# fix line encoding of bundled jquery.js
dos2unix -k ./sphinx/themes/basic/static/jquery.js
@@ -410,29 +266,22 @@ dos2unix -k ./sphinx/themes/basic/static/jquery.js
rm tests/test_ext_imgconverter.py
%endif
%if %{without websupport}
rm tests/test_websupport.py tests/test_api_translator.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}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif # with_python3
%pyproject_wheel
export PYTHONPATH=$PWD
pushd doc
%if 0%{?with_python3}
export SPHINXBUILD="%{__python3} ../sphinx/cmd/build.py"
%else
export SPHINXBUILD="%{__python2} ../sphinx/cmd/build.py"
%endif
export SPHINXBUILD="%{python3} ../sphinx/cmd/build.py"
make html SPHINXBUILD="$SPHINXBUILD"
make man SPHINXBUILD="$SPHINXBUILD"
rm -rf _build/html/.buildinfo
@@ -441,58 +290,40 @@ popd
%install
%if 0%{?with_python3}
%py3_install
install -d %{buildroot}%{_libexecdir}/python3-sphinx
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
done
%endif # with_python3
%pyproject_install
%py2_install
install -d %{buildroot}%{_libexecdir}/python2-sphinx
# 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-%{python2_version}
ln -s $i-%{python2_version} %{buildroot}%{_bindir}/$i-2
ln -s %{_bindir}/$i-2 %{buildroot}%{_libexecdir}/python2-sphinx/$i
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
ln -s %{_bindir}/$i %{buildroot}%{_bindir}/$i-3
done
# 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}%{python2_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 \
@@ -503,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
@@ -545,79 +349,161 @@ done
%if %{with tests}
%check
export PYTHONPATH=$PWD
# 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
# Igoring test_api_translator for now as it fails on Fedora.
# The issue has been reported upstream: https://github.com/sphinx-doc/sphinx/issues/4710
LANG=en_US.UTF-8 %{__python2} -m pytest -v --ignore=tests/test_api_translator.py
%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
%endif # with tests
# Currently, all linkcheck tests and test_latex_images need internet
%pytest \
%if %{without internet}
-k "not linkcheck and not test_latex_images" \
%endif
;
%endif
%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

View File

@@ -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@

View File

@@ -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@

View 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

View 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__

View File

@@ -1 +1 @@
SHA512 (Sphinx-1.7.6.tar.gz) = 505c4e92c1a09c48a50d8bd0ec86089bd3f0f5352302ae330e2fba6e61316f40c6ec3726e2cfaeb54de0818127a26ef5364ac92bcf254283022c38c4e95d419c
SHA512 (Sphinx-4.1.2.tar.gz) = 1fe998de7b8fc47989e186835748b7fb5d0b523db95434515b6af29b56d28372f2f92ab917c27cbed51aa0cad13175eda8bf4fc93a8726eb5e93e9bc6995e457

View File

@@ -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()

View File

@@ -1,2 +0,0 @@
# Add path to the default python-sphinx scripts on this version of Fedora
module load python-sphinx >& /dev/null

View File

@@ -1,2 +0,0 @@
# Add path to the default python-sphinx scripts on this version of Fedora
module load python-sphinx 2> /dev/null