Compare commits
No commits in common. "c8" and "stream-python27-2.7-rhel-8.10.0" have entirely different histories.
c8
...
stream-pyt
|
@ -1 +1,9 @@
|
|||
SOURCES/docutils-0.14.tar.gz
|
||||
docutils-0.7.tar.gz
|
||||
/docutils-0.8.tar.gz
|
||||
/docutils-0.8.1.tar.gz
|
||||
/docutils-0.9.1.tar.gz
|
||||
/docutils-0.10.tar.gz
|
||||
/docutils-0.11.tar.gz
|
||||
/docutils-0.12.tar.gz
|
||||
/docutils-0.13.1.tar.gz
|
||||
/docutils-0.14.tar.gz
|
||||
|
|
|
@ -1 +1 @@
|
|||
32cefb69ac3dab5b04c4d150776f35419cc4c863 SOURCES/docutils-0.14.tar.gz
|
||||
32cefb69ac3dab5b04c4d150776f35419cc4c863 docutils-0.14.tar.gz
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
diff -up docutils-0.10/docutils/writers/docutils_xml.py.bak docutils-0.10/docutils/writers/docutils_xml.py
|
||||
--- docutils-0.10/docutils/writers/docutils_xml.py.bak 2012-07-30 20:57:20.000000000 -0700
|
||||
+++ docutils-0.10/docutils/writers/docutils_xml.py 2012-08-14 07:51:20.389219183 -0700
|
||||
@@ -11,6 +11,19 @@ http://docutils.sourceforge.net/docs/ref
|
||||
__docformat__ = 'reStructuredText'
|
||||
|
||||
import sys
|
||||
+
|
||||
+# Work around broken PyXML and obsolete python stdlib behaviour (The
|
||||
+# stdlib replaces its own xml module with the unmaintained PyXML if PyXML
|
||||
+# is installed.) Reverse the order in which xml module and submodules are
|
||||
+# searched to import stdlib modules if they exist and PyXML modules if they
|
||||
+# do not exist in the stdlib.
|
||||
+#
|
||||
+# See http://sourceforge.net/tracker/index.php?func=detail&aid=3552403&group_id=38414&atid=422030
|
||||
+# and http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000406.html
|
||||
+import xml
|
||||
+if "_xmlplus" in xml.__path__[0]: # PyXML sub-module
|
||||
+ xml.__path__.reverse() # If both are available, prefer stdlib over PyXML
|
||||
+
|
||||
import xml.sax.saxutils
|
||||
from StringIO import StringIO
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
Index: docutils-0.9.1/docutils/parsers/rst/directives/misc.py
|
||||
===================================================================
|
||||
--- docutils-0.9.1.orig/docutils/parsers/rst/directives/misc.py
|
||||
+++ docutils-0.9.1/docutils/parsers/rst/directives/misc.py
|
||||
@@ -10,6 +10,7 @@ import sys
|
||||
import os.path
|
||||
import re
|
||||
import time
|
||||
+import locale
|
||||
from docutils import io, nodes, statemachine, utils
|
||||
from docutils.error_reporting import SafeString, ErrorString
|
||||
from docutils.parsers.rst import Directive, convert_directive_function
|
||||
@@ -474,6 +475,17 @@ class Date(Directive):
|
||||
'a substitution definition.' % self.name)
|
||||
format = '\n'.join(self.content) or '%Y-%m-%d'
|
||||
text = time.strftime(format)
|
||||
+ if sys.version_info< (3, 0):
|
||||
+ try:
|
||||
+ text = unicode(text, locale.getpreferredencoding())
|
||||
+ except UnicodeError:
|
||||
+ try:
|
||||
+ text = unicode(text, 'utf-8')
|
||||
+ except UnicodeError:
|
||||
+ # Fallback to something that can decode all bytes to
|
||||
+ # something. Alternative fallback would be to decode
|
||||
+ # with errors='replace'
|
||||
+ text = unicode(text, 'latin-1')
|
||||
return [nodes.Text(text)]
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
Index: docutils-0.8.1/docutils/frontend.py
|
||||
===================================================================
|
||||
--- docutils-0.8.1.orig/docutils/frontend.py
|
||||
+++ docutils-0.8.1/docutils/frontend.py
|
||||
@@ -33,6 +33,7 @@ import sys
|
||||
import warnings
|
||||
import ConfigParser as CP
|
||||
import codecs
|
||||
+import locale
|
||||
import optparse
|
||||
from optparse import SUPPRESS_HELP
|
||||
import docutils
|
||||
@@ -193,7 +194,36 @@ def make_paths_absolute(pathdict, keys,
|
||||
value = make_one_path_absolute(base_path, value)
|
||||
pathdict[key] = value
|
||||
|
||||
+def _bytes_path_to_unicode(path):
|
||||
+ '''Change a byte str path segment into unicode
|
||||
+
|
||||
+ Note that this is arguably wrong for Unix systems. Unix filesystem paths
|
||||
+ are bytes that programs interpret as characters. Filesystem paths are in
|
||||
+ no way guaranteed to be decodable into unicode. So this could traceback
|
||||
+ if the locale_encoding can't deal with any byte string and it could give
|
||||
+ wrong values if the locale_encoding does not match the encoding of
|
||||
+ a single one of the path component's values.
|
||||
+
|
||||
+ However, the rest of docutils is turning command line args containing
|
||||
+ filenames into unicode so switching to unicode is more inline with the
|
||||
+ strategy taken by the rest of docutils.
|
||||
+ '''
|
||||
+ # converting to Unicode (Python 3 does this automatically):
|
||||
+ if sys.version_info < (3,0):
|
||||
+ # TODO: make this failsafe and reversible
|
||||
+ # locale.getpreferredencoding is not to be preferred to getlocale or
|
||||
+ # getdefaultlocale but it is preferred to hardcoding a value. We end
|
||||
+ # with latin-1 because it's one of the encodings that is valid for
|
||||
+ # every byte.
|
||||
+ encoding = locale_encoding or locale.getpreferredencoding() or 'latin-1'
|
||||
+ path = unicode(path, encoding)
|
||||
+ return path
|
||||
+
|
||||
def make_one_path_absolute(base_path, path):
|
||||
+ if isinstance(base_path, unicode) and not isinstance(path, unicode):
|
||||
+ path = _bytes_path_to_unicode(path)
|
||||
+ elif isinstance(path, unicode) and not isinstance(base_path, unicode):
|
||||
+ base_path = _bytes_path_to_unicode(base_path)
|
||||
return os.path.abspath(os.path.join(base_path, path))
|
||||
|
||||
def filter_settings_spec(settings_spec, *exclude, **replace):
|
|
@ -0,0 +1,37 @@
|
|||
diff -up docutils-0.10/docutils/writers/latex2e/__init__.py.py33 docutils-0.10/docutils/writers/latex2e/__init__.py
|
||||
--- docutils-0.10/docutils/writers/latex2e/__init__.py.py33 2012-08-07 14:57:41.057751711 -0400
|
||||
+++ docutils-0.10/docutils/writers/latex2e/__init__.py 2012-08-07 14:57:46.730751705 -0400
|
||||
@@ -379,7 +379,7 @@ class Babel(object):
|
||||
|
||||
def __call__(self):
|
||||
"""Return the babel call with correct options and settings"""
|
||||
- languages = self.otherlanguages.keys()
|
||||
+ languages = sorted(self.otherlanguages.keys())
|
||||
languages.append(self.language or 'english')
|
||||
self.setup = [r'\usepackage[%s]{babel}' % ','.join(languages)]
|
||||
if 'spanish' in languages:
|
||||
diff -up docutils-0.10/docutils/writers/xetex/__init__.py.py33 docutils-0.10/docutils/writers/xetex/__init__.py
|
||||
--- docutils-0.10/docutils/writers/xetex/__init__.py.py33 2012-08-07 14:42:22.041753020 -0400
|
||||
+++ docutils-0.10/docutils/writers/xetex/__init__.py 2012-08-07 14:44:51.983751704 -0400
|
||||
@@ -117,7 +117,7 @@ class Babel(latex2e.Babel):
|
||||
r'\setdefaultlanguage{%s}' % self.language]
|
||||
if self.otherlanguages:
|
||||
setup.append(r'\setotherlanguages{%s}' %
|
||||
- ','.join(self.otherlanguages.keys()))
|
||||
+ ','.join(sorted(self.otherlanguages.keys())))
|
||||
return '\n'.join(setup)
|
||||
|
||||
|
||||
diff -up docutils-0.10/test/functional/expected/standalone_rst_latex.tex.py33 docutils-0.10/test/functional/expected/standalone_rst_latex.tex
|
||||
diff -up docutils-0.10/test/functional/expected/standalone_rst_xetex.tex.py33 docutils-0.10/test/functional/expected/standalone_rst_xetex.tex
|
||||
--- docutils-0.10/test/functional/expected/standalone_rst_xetex.tex.py33 2012-08-07 14:52:09.929751238 -0400
|
||||
+++ docutils-0.10/test/functional/expected/standalone_rst_xetex.tex 2012-08-07 14:52:30.932751704 -0400
|
||||
@@ -7,7 +7,7 @@
|
||||
\usepackage{amsmath}
|
||||
\usepackage{polyglossia}
|
||||
\setdefaultlanguage{english}
|
||||
-\setotherlanguages{german,british,french}
|
||||
+\setotherlanguages{british,french,german}
|
||||
\usepackage{color}
|
||||
\usepackage{float} % float configuration
|
||||
\floatplacement{figure}{H} % place figures here definitely
|
|
@ -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
|
||||
|
|
@ -1,19 +1,18 @@
|
|||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%global with_python3 0%{!?_without_python3:1}
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 7
|
||||
# Disable python2 build by default
|
||||
%bcond_with python36_module
|
||||
|
||||
# python2X and python3X are built form the same module, so we need a conditional for python2 bits
|
||||
# the state of the conditional is not important in the spec, it is set in modulemd
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
%global srcname docutils
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.14
|
||||
Release: 7%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: System for processing plaintext documentation
|
||||
|
||||
Group: Development/Languages
|
||||
|
@ -30,13 +29,19 @@ Source0: %{srcname}-%{version}.tar.gz
|
|||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
%endif # with python2
|
||||
%if 0%{?with_python3}
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%if %{with python36_module}
|
||||
BuildRequires: python36-devel
|
||||
BuildRequires: python36-rpm-macros
|
||||
%else
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
@ -54,7 +59,6 @@ Python inline documentation modules and packages.
|
|||
%package -n python2-%{srcname}
|
||||
Summary: System for processing plaintext documentation for python2
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
Provides: docutils = %{version}-%{release}
|
||||
Obsoletes: docutils < %{version}-%{release}
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
|
@ -67,9 +71,9 @@ access to this functionality.
|
|||
Currently, the library supports parsing rST that is in standalone files and
|
||||
PEPs (Python Enhancement Proposals). Work is underway to parse rST from
|
||||
Python inline documentation modules and packages.
|
||||
%endif # with python2
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
%package -n python3-%{srcname}
|
||||
Summary: System for processing plaintext documentation for python3
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
@ -87,7 +91,7 @@ PEPs (Python Enhancement Proposals). Work is underway to parse rST from
|
|||
Python inline documentation modules and packages.
|
||||
|
||||
This package contains the module, ported to run under python3.
|
||||
%endif # with_python3
|
||||
%endif # with python3
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
|
@ -100,21 +104,19 @@ done
|
|||
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
|
||||
mv tmp tools/editors/emacs/IDEAS.rst
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif # with python2
|
||||
%{?with_python2:%py2_build}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%py3_build
|
||||
popd
|
||||
%endif # with_python3
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%install
|
||||
|
@ -122,21 +124,18 @@ popd
|
|||
%if %{with python2}
|
||||
%py2_install
|
||||
|
||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
||||
mv $file `dirname $file`/`basename $file .py`-2
|
||||
done
|
||||
# We only want to ship the Python 3 executables, delete these
|
||||
rm -f %{buildroot}/%{_bindir}/*.py
|
||||
%endif
|
||||
|
||||
# We want the licenses but don't need this build file
|
||||
rm -f licenses/docutils.conf
|
||||
|
||||
# Flash file is used for testing docutils but shouldn't be in the installed package.
|
||||
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
||||
%endif # with python2
|
||||
|
||||
# Must do the python3 install first because the scripts in /usr/bin are
|
||||
# overwritten by setup.py install (and we want the python2 version to be the
|
||||
# default for now).
|
||||
%if 0%{?with_python3}
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
|
||||
|
@ -151,16 +150,14 @@ done
|
|||
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
|
||||
popd
|
||||
|
||||
%endif # with_python3
|
||||
%endif # with python3
|
||||
|
||||
%check
|
||||
%if %{with python2}
|
||||
mv biohazard.swf docs/user/rst/images/biohazard.swf
|
||||
%{__python2} test/alltests.py
|
||||
%{?with_python2:%{__python2} test/alltests.py}
|
||||
rm docs/user/rst/images/biohazard.swf
|
||||
%endif # with python2
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
mv biohazard.swf docs/user/rst/images/biohazard.swf
|
||||
%{__python3} test3/alltests.py
|
||||
|
@ -173,34 +170,49 @@ popd
|
|||
%license COPYING.txt licenses/*
|
||||
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
||||
%doc THANKS.txt docs tools/editors
|
||||
%{_bindir}/*-2
|
||||
%{python2_sitelib}/*
|
||||
%endif # with python2
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%if %{with python3}
|
||||
%files -n python3-%{srcname}
|
||||
%license COPYING.txt licenses/*
|
||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
||||
%doc THANKS.txt docs tools/editors
|
||||
%{_bindir}/*[!'-2']
|
||||
%{_bindir}/*
|
||||
%{python3_sitelib}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Jul 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-7
|
||||
- Conditionalize the python2 subpackage
|
||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 0.14-12
|
||||
- Bumping due to problems with modular RPM upgrade path
|
||||
- Resolves: rhbz#1695587
|
||||
|
||||
* Tue Jul 10 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-6
|
||||
* Tue Dec 11 2018 Tomas Orsava <torsava@redhat.com> - 0.14-11
|
||||
- Remove python2 executables - they are functionally identical to the python3
|
||||
executables, so we're only going to ship them in the python3 subpackage
|
||||
- Resolves: rhbz#1656477
|
||||
|
||||
* Tue Oct 09 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-10
|
||||
- Remove unversioned provides
|
||||
- Resolves: rhbz#1628242
|
||||
|
||||
* Thu Aug 02 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.14-9
|
||||
- Change the binaries to python3 as default
|
||||
|
||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 0.14-5
|
||||
- Fix specfile typos and oversights
|
||||
- Fix python3-setuptools dependency
|
||||
- Export RHEL workaround variables
|
||||
- Use {__python2} as RPM macro, not shell variable
|
||||
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 0.14-8
|
||||
- Switch python3 coditions to bcond
|
||||
|
||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 0.14-4
|
||||
- Allow Python 2 for build
|
||||
* Wed Jul 18 2018 Tomas Orsava <torsava@redhat.com> - 0.14-7
|
||||
- BuildRequire also python36-rpm-macros as part of the python36 module build
|
||||
|
||||
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14-6
|
||||
- Add a bcond for python2
|
||||
|
||||
* Mon Jun 25 2018 Tomas Orsava <torsava@redhat.com> - 0.14-5
|
||||
- Fix the invocation of Python
|
||||
|
||||
* Mon Apr 30 2018 Tomas Orsava <torsava@redhat.com> - 0.14-4
|
||||
- Require the python36-devel package when building for the python36 module
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
@ -0,0 +1,4 @@
|
|||
# exclude XML template (not always valid) from XML validity check:
|
||||
xml:
|
||||
ignore:
|
||||
- /usr/lib/python*/site-packages/docutils/writers/pep_html/template.txt
|
Loading…
Reference in New Issue