Rebuild for Python 3.6

Added patch to fix failing tests.

Remove Requires of python-imaging as this package has been retired.
This commit is contained in:
Charalampos Stratakis 2016-12-10 23:24:39 +01:00
parent fe33132bdf
commit 5c85656290
2 changed files with 77 additions and 4 deletions

66
fix-failing-tests.patch Normal file
View File

@ -0,0 +1,66 @@
From 54f4b07302ce3ced064f7093d86b00c2fe1e81c0 Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com>
Date: Thu, 5 May 2016 17:48:26 +0200
Subject: [PATCH] Fix failing tests
---
test/test_parsers/test_rst/test_directives/test_code.py | 6 +++---
test/test_parsers/test_rst/test_directives/test_code_long.py | 2 +-
test/test_parsers/test_rst/test_interpreted.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/test_parsers/test_rst/test_directives/test_code.py b/test/test_parsers/test_rst/test_directives/test_code.py
index 219a975..8168357 100644
--- a/test/test_parsers/test_rst/test_directives/test_code.py
+++ b/test/test_parsers/test_rst/test_directives/test_code.py
@@ -107,10 +107,10 @@ totest['code-parsing'] = [
<inline classes="keyword">
print
\n\
- <inline classes="literal string">
+ <inline classes="literal string single">
'hello world'
\n\
- <inline classes="comment">
+ <inline classes="comment single">
# to stdout
"""],
["""\
@@ -155,7 +155,7 @@ totest['code-parsing'] = [
<inline classes="ln">
11 \n\
\n\
- <inline classes="comment">
+ <inline classes="comment single">
# and now for something completely different
\n\
<inline classes="ln">
diff --git a/test/test_parsers/test_rst/test_directives/test_code_long.py b/test/test_parsers/test_rst/test_directives/test_code_long.py
index 6adf631..d2e5dbb 100644
--- a/test/test_parsers/test_rst/test_directives/test_code_long.py
+++ b/test/test_parsers/test_rst/test_directives/test_code_long.py
@@ -60,7 +60,7 @@ totest['code-parsing-long'] = [
<inline classes="ln">
11 \n\
\n\
- <inline classes="comment">
+ <inline classes="comment single">
# and now for something completely different
\n\
<inline classes="ln">
diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test/test_parsers/test_rst/test_interpreted.py
index 7beab09..a9227e2 100755
--- a/test/test_parsers/test_rst/test_interpreted.py
+++ b/test/test_parsers/test_rst/test_interpreted.py
@@ -283,7 +283,7 @@ Python code :python:`print("The end")`.
print
<inline classes="punctuation">
(
- <inline classes="literal string">
+ <inline classes="literal string double">
"The end"
<inline classes="punctuation">
)
--
2.5.5

View File

@ -11,7 +11,7 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 0.12 Version: 0.12
Release: 0.7.20140510svn7747%{?dist} Release: 0.8.20140510svn7747%{?dist}
Summary: System for processing plaintext documentation Summary: System for processing plaintext documentation
Group: Development/Languages Group: Development/Languages
@ -26,6 +26,10 @@ URL: http://docutils.sourceforge.net
# The tarball is in dist/docutils-VERSION.tar.gz # The tarball is in dist/docutils-VERSION.tar.gz
Source0: %{srcname}-%{version}.tar.gz Source0: %{srcname}-%{version}.tar.gz
# Patch to fix failing tests
# Merged upstream: https://sourceforge.net/p/docutils/patches/131/
Patch0: fix-failing-tests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
@ -36,7 +40,6 @@ BuildRequires: python3-devel
BuildRequires: python-tools BuildRequires: python-tools
%endif %endif
Requires: python-imaging
Provides: docutils = %{version}-%{release} Provides: docutils = %{version}-%{release}
Obsoletes: docutils < %{version}-%{release} Obsoletes: docutils < %{version}-%{release}
@ -55,8 +58,6 @@ Python inline documentation modules and packages.
%package -n python3-%{srcname} %package -n python3-%{srcname}
Summary: System for processing plaintext documentation for python3 Summary: System for processing plaintext documentation for python3
Group: Development/Languages Group: Development/Languages
# This module is optional and not yet available for python3
Requires: python3-imaging
%description -n python3-%{srcname} %description -n python3-%{srcname}
The Docutils project specifies a plaintext markup language, reStructuredText, The Docutils project specifies a plaintext markup language, reStructuredText,
@ -74,6 +75,7 @@ This package contains the module, ported to run under python3.
%prep %prep
%setup -q -n %{srcname}-%{version} %setup -q -n %{srcname}-%{version}
%patch0 -p1
# Remove shebang from library files # Remove shebang from library files
for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
@ -161,6 +163,11 @@ rm -rf %{buildroot}
%endif %endif
%changelog %changelog
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.12-0.8.20140510svn7747
- Rebuild for Python 3.6
- Fix failing tests
- Remove runtime requirement for python-imaging
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-0.7.20140510svn7747 * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-0.7.20140510svn7747
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages