Update to 1.6.3 (rhbz#1426928)

Mark the test_latex_remote_images as expected failure
since it tries to fetch images from the web which is not possible
in koji or mock.

Added dependencies on python-typing,
python-sphinxcontrib-websupport, tex(ctablestack.sty)
and ImageMagick.
This commit is contained in:
Charalampos Stratakis 2017-07-20 19:58:34 +02:00
parent 43596e5731
commit 6fe65c3b4d
7 changed files with 36 additions and 77 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/Sphinx-1.4.9.tar.gz
/Sphinx-1.5.1.tar.gz
/Sphinx-1.5.2.tar.gz
/Sphinx-1.6.3.tar.gz

View File

@ -1,15 +0,0 @@
--- sphinx/doc/Makefile.mantarget 2014-02-13 23:28:58.604797750 +0700
+++ sphinx/doc/Makefile 2014-02-14 00:00:45.794658764 +0700
@@ -12,6 +12,12 @@
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+# Likewise for man, since a man directory exist and make will assume
+# the target is up to date
+.PHONY: man
+man:
+ @$(SPHINXBUILD) -M man "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%:

View File

@ -1,21 +0,0 @@
diff --git Sphinx-1.3.1/sphinx/builders/linkcheck.py~ Sphinx-1.3.1/sphinx/builders/linkcheck.py
index 9f5c2131c2..71bec0262d 100644
--- Sphinx-1.3.1/sphinx/builders/linkcheck.py~
+++ Sphinx-1.3.1/sphinx/builders/linkcheck.py
@@ -19,9 +19,15 @@ from six.moves import queue
from six.moves.urllib.request import build_opener, Request, HTTPRedirectHandler
from six.moves.urllib.parse import unquote, urlsplit, quote
from six.moves.urllib.error import HTTPError
-from six.moves.html_parser import HTMLParser, HTMLParseError
+from six.moves.html_parser import HTMLParser
from docutils import nodes
+try:
+ from HTMLParser import HTMLParseError
+except ImportError:
+ class HTMLParseError(Exception):
+ pass
+
from sphinx.builders import Builder
from sphinx.util.console import purple, red, darkgreen, darkgray, \
darkred, turquoise

View File

@ -1,34 +0,0 @@
From cf795894b9290c5ab2035ae21535f0a7f4b7107a Mon Sep 17 00:00:00 2001
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
Date: Fri, 16 Dec 2016 19:44:27 +0900
Subject: [PATCH] Fix #3246: xapian search adapter crashes
---
CHANGES | 2 ++
sphinx/websupport/search/xapiansearch.py | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py
index 1e43dcb..aa7cff8 100644
--- a/sphinx/websupport/search/xapiansearch.py
+++ b/sphinx/websupport/search/xapiansearch.py
@@ -39,16 +39,16 @@ def finish_indexing(self):
# Ensure the db lock is removed.
del self.database
- def add_document(self, path, title, text):
+ def add_document(self, pagename, filename, title, text):
self.database.begin_transaction()
# sphinx_page_path is used to easily retrieve documents by path.
- sphinx_page_path = '"sphinxpagepath%s"' % path.replace('/', '_')
+ sphinx_page_path = '"sphinxpagepath%s"' % pagename.replace('/', '_')
# Delete the old document if it exists.
self.database.delete_document(sphinx_page_path)
doc = xapian.Document()
doc.set_data(text)
- doc.add_value(self.DOC_PATH, path)
+ doc.add_value(self.DOC_PATH, pagename)
doc.add_value(self.DOC_TITLE, title)
self.indexer.set_document(doc)
self.indexer.index_text(text)

View File

@ -14,8 +14,8 @@
%global upstream_name Sphinx
Name: python-sphinx
Version: 1.5.2
Release: 2%{?dist}
Version: 1.6.3
Release: 1%{?dist}
Summary: Python documentation generator
Group: Development/Tools
@ -36,6 +36,11 @@ Source5: README.fedora
# python-sphinx execuitables is default
Source6: default-sphinx-command.in
# 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
BuildArch: noarch
BuildRequires: python2-devel >= 2.4
BuildRequires: python2-babel
@ -48,6 +53,8 @@ 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)
# for fixes
@ -67,6 +74,7 @@ BuildRequires: python-html5lib
BuildRequires: python-whoosh
BuildRequires: python2-snowballstemmer
BuildRequires: python-enum34
BuildRequires: ImageMagick
# note: no Python3 xapian binding yet
BuildRequires: xapian-bindings-python
BuildRequires: texlive-collection-fontsrecommended
@ -101,6 +109,7 @@ BuildRequires: tex(luatex85.sty)
BuildRequires: tex(fncychap.sty)
BuildRequires: tex(tabulary.sty)
BuildRequires: tex(polyglossia.sty)
BuildRequires: tex(ctablestack.sty)
BuildRequires: tex(eu1enc.def)
%if 0%{?with_python3}
@ -124,6 +133,7 @@ BuildRequires: python3-sphinx_rtd_theme
BuildRequires: python3-sphinx-theme-alabaster
BuildRequires: python3-imagesize
BuildRequires: python3-requests
BuildRequires: python3-sphinxcontrib-websupport
%endif # with_python3
@ -170,11 +180,14 @@ 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 = %{version}-%{release}
@ -248,6 +261,7 @@ Requires: tex(luatex85.sty)
Requires: tex(fncychap.sty)
Requires: tex(tabulary.sty)
Requires: tex(polyglossia.sty)
Requires: tex(ctablestack.sty)
Requires: tex(eu1enc.def)
Obsoletes: python3-sphinx-latex < 1.4.4-2
@ -279,7 +293,9 @@ 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
@ -362,10 +378,6 @@ sed '1d' -i sphinx/pycode/pgen2/token.py
# fix line encoding of bundled jquery.js
dos2unix -k ./sphinx/themes/basic/static/jquery.js
# In 1.5.2, the upstream tarball left this .pyc by mistake.
# Remove it so that it doesn't get included in the python3 build by mistake
rm sphinx/locale/__init__.pyc
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -582,6 +594,9 @@ popd
%changelog
* Thu Jul 20 2017 Charalampos Stratakis <cstratak@redhat.com> - - 1.6.3-1
- Update to 1.6.3 (bz#1426928)
* Sat Feb 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.2-2
- Cleanup source files that should not be installed
- Fix the __init__.pyc that was byte compiled for the wrong python

View File

@ -1 +1 @@
SHA512 (Sphinx-1.5.2.tar.gz) = 32c8fb98d72e998fcce8c46ceddcbb0a0776d0e9ce75dc96cef48139b8b47ebe9636243fb48b9e04c8e1d5c56e09fc4c60248fbbef810fba9813b83a3e6cbe88
SHA512 (Sphinx-1.6.3.tar.gz) = d5aec58e19239db4e61fcd6b103fcc838d97aad5a7aaf9279ff1097791d9cd1ba245989307a2d1049c123058b84ca4e91db192a1672c040d80fafed3907736ae

View File

@ -0,0 +1,13 @@
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()