From 1e96511926474846f9645855219e5daf534ef702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 25 Nov 2015 10:12:55 -0500 Subject: [PATCH] Restore patch and require mock for tests --- html-parser-HTMLParserError-removed.patch | 29 +++++++++++++---------- python-sphinx.spec | 7 +++++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/html-parser-HTMLParserError-removed.patch b/html-parser-HTMLParserError-removed.patch index d44ef22..10b3b5d 100644 --- a/html-parser-HTMLParserError-removed.patch +++ b/html-parser-HTMLParserError-removed.patch @@ -1,18 +1,21 @@ -diff -up Sphinx-1.2.3/sphinx/builders/linkcheck.py.old Sphinx-1.2.3/sphinx/builders/linkcheck.py ---- Sphinx-1.2.3/sphinx/builders/linkcheck.py.old 2015-10-13 15:15:40.767811124 +0200 -+++ Sphinx-1.2.3/sphinx/builders/linkcheck.py 2015-10-13 15:14:41.916145677 +0200 -@@ -17,7 +17,13 @@ import threading - from os import path - from urllib2 import build_opener, unquote, Request, \ - HTTPError, HTTPRedirectHandler --from HTMLParser import HTMLParser, HTMLParseError -+from HTMLParser import HTMLParser -+ +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 docutils import nodes - ++ + from sphinx.builders import Builder + from sphinx.util.console import purple, red, darkgreen, darkgray, \ + darkred, turquoise diff --git a/python-sphinx.spec b/python-sphinx.spec index 9f78228..ec8ff40 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -21,6 +21,7 @@ License: BSD and Public Domain and Python and (MIT or GPLv2) URL: http://sphinx-doc.org/ Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz Patch0: Sphinx-1.2.1-mantarget.patch +Patch1: html-parser-HTMLParserError-removed.patch BuildArch: noarch BuildRequires: python2-devel >= 2.4 @@ -41,6 +42,7 @@ BuildRequires: python-nose BuildRequires: gettext BuildRequires: texinfo BuildRequires: python-sqlalchemy +BuildRequires: python-mock BuildRequires: python-whoosh BuildRequires: python2-snowballstemmer # note: no Python3 xapian binding yet @@ -69,6 +71,7 @@ BuildRequires: python3-jinja2 BuildRequires: python3-pygments BuildRequires: python3-nose BuildRequires: python3-sqlalchemy +BuildRequires: python3-mock BuildRequires: python3-whoosh BuildRequires: python3-snowballstemmer BuildRequires: python3-six @@ -112,6 +115,7 @@ Requires: python-babel Requires: python-docutils Requires: python-jinja2 Requires: python-pygments +Requires: python-mock Requires: python2-snowballstemmer Requires: python2-sphinx_rtd_theme Requires: python-sphinx_rtd_theme @@ -185,6 +189,7 @@ Requires: python-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 @@ -403,7 +408,7 @@ popd %changelog * Tue Nov 24 2015 Julien Enselme - 1.3.1-1 -- Update to 1.3.1 +- Update to 1.3.1 (#1136284) - Update to new guidelines - Make the default executable use python3