Accepting request 359916 from home:TheBlackCat:branches:devel:languages:python
Add fix_some_testcase_error_with_pygments-2.1.1.patch Fixes tests with python-Pygments 2.1.1. OBS-URL: https://build.opensuse.org/request/show/359916 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=71
This commit is contained in:
parent
b51e64f6b4
commit
fcf26c39ec
39
fix_some_testcase_error_with_pygments-2.1.1.patch
Normal file
39
fix_some_testcase_error_with_pygments-2.1.1.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 50f4862b069d58ade556aad90bd179206f10fdc1 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Mon, 15 Feb 2016 11:46:30 +0900
|
||||
Subject: [PATCH] Fix some testcase get error with pygments-2.1.1
|
||||
|
||||
---
|
||||
tests/test_build_html.py | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
|
||||
index b97d9d5..c11ad68 100644
|
||||
--- a/tests/test_build_html.py
|
||||
+++ b/tests/test_build_html.py
|
||||
@@ -344,12 +344,23 @@ def check_xpath(etree, fname, path, check, be_found=True):
|
||||
# only check for node presence
|
||||
pass
|
||||
else:
|
||||
+ def get_text(node):
|
||||
+ if node.text is not None:
|
||||
+ return node.text
|
||||
+ else:
|
||||
+ # Since pygments-2.1.1, empty <span> tag is inserted at top of
|
||||
+ # highlighting block
|
||||
+ if len(node) == 1 and node[0].tag == 'span' and node[0].text is None:
|
||||
+ return node[0].tail
|
||||
+ else:
|
||||
+ return ''
|
||||
+
|
||||
rex = re.compile(check)
|
||||
if be_found:
|
||||
- if any(node.text and rex.search(node.text) for node in nodes):
|
||||
+ if any(rex.search(get_text(node)) for node in nodes):
|
||||
return
|
||||
else:
|
||||
- if all(node.text and not rex.search(node.text) for node in nodes):
|
||||
+ if all(not rex.search(get_text(node)) for node in nodes):
|
||||
return
|
||||
|
||||
assert False, ('%r not found in any node matching '
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 17 09:10:17 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Add fix_some_testcase_error_with_pygments-2.1.1.patch
|
||||
Fixes tests with python-Pygments 2.1.1.
|
||||
Should be in next release.
|
||||
See https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1
|
||||
- Add additional latex requirements.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 25 10:56:43 UTC 2016 - michael@stroeder.com
|
||||
|
||||
|
@ -24,6 +24,9 @@ Summary: Python documentation generator
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix_some_testcase_error_with_pygments-2.1.1.patch - fix tests with python-Pygments 2.1.1
|
||||
# See https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1
|
||||
Patch0: fix_some_testcase_error_with_pygments-2.1.1.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
@ -99,26 +102,24 @@ Group: Productivity/Publishing/TeX/Base
|
||||
Requires: texlive-latex
|
||||
Requires: texlive-metafont
|
||||
Requires: texlive-pdftex
|
||||
Requires: tex(article.cls)
|
||||
Requires: tex(pdftex.def)
|
||||
Requires: tex(utf8.def)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(8r.enc)
|
||||
Requires: tex(english.ldf)
|
||||
Requires: tex(pdftex.map)
|
||||
Requires: tex(alltt.sty)
|
||||
Requires: tex(amsfonts.sty)
|
||||
Requires: tex(amsmath.sty)
|
||||
Requires: tex(amssymb.sty)
|
||||
Requires: tex(amsthm.sty)
|
||||
Requires: tex(array.sty)
|
||||
Requires: tex(article.cls)
|
||||
Requires: tex(atbegshi.sty)
|
||||
Requires: tex(babel.sty)
|
||||
Requires: tex(bm.sty)
|
||||
Requires: tex(capt-of.sty)
|
||||
Requires: tex(cmap.sty)
|
||||
Requires: tex(color.sty)
|
||||
Requires: tex(colortbl.sty)
|
||||
Requires: tex(dvipdfmx.def)
|
||||
Requires: tex(english.ldf)
|
||||
Requires: tex(eqparbox.sty)
|
||||
Requires: tex(fancybox.sty)
|
||||
Requires: tex(fancyhdr.sty)
|
||||
Requires: tex(fancyvrb.sty)
|
||||
@ -136,21 +137,27 @@ Requires: tex(inputenc.sty)
|
||||
Requires: tex(longtable.sty)
|
||||
Requires: tex(makeidx.sty)
|
||||
Requires: tex(multirow.sty)
|
||||
Requires: tex(needspace.sty)
|
||||
Requires: tex(newfloat.sty)
|
||||
Requires: tex(palatino.sty)
|
||||
Requires: tex(parskip.sty)
|
||||
Requires: tex(pcrr.tfm)
|
||||
Requires: tex(pdftex.def)
|
||||
Requires: tex(pdftex.map)
|
||||
Requires: tex(phvr.tfm)
|
||||
Requires: tex(pplr.tfm)
|
||||
Requires: tex(preview.sty)
|
||||
Requires: tex(ptmr.tfm)
|
||||
Requires: tex(pzcmi.tfm)
|
||||
Requires: tex(tabulary.sty)
|
||||
Requires: tex(textcomp.sty)
|
||||
Requires: tex(threeparttable.sty)
|
||||
Requires: tex(times.sty)
|
||||
Requires: tex(titlesec.sty)
|
||||
Requires: tex(upquote.sty)
|
||||
Requires: tex(utf8.def)
|
||||
Requires: tex(utf8x.def)
|
||||
Requires: tex(wrapfig.sty)
|
||||
Requires: tex(pcrr.tfm)
|
||||
Requires: tex(phvr.tfm)
|
||||
Requires: tex(pplr.tfm)
|
||||
Requires: tex(ptmr.tfm)
|
||||
Requires: tex(pzcmi.tfm)
|
||||
|
||||
%description latex
|
||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||
@ -168,6 +175,8 @@ This package contains the LaTeX components for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n Sphinx-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning
|
||||
# Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to
|
||||
# allow for update-alternatives later on:
|
||||
|
Loading…
Reference in New Issue
Block a user