Date: Saturday, July 27, 2013 @ 19:49:30 Author: seblu Revision: 94595
archrelease: copy trunk to community-any Added: docutils/repos/community-any/01-python33-relative-import.patch (from rev 94594, docutils/trunk/01-python33-relative-import.patch) docutils/repos/community-any/PKGBUILD (from rev 94594, docutils/trunk/PKGBUILD) docutils/repos/community-any/python2-docutils.install (from rev 94594, docutils/trunk/python2-docutils.install) Deleted: docutils/repos/community-any/01-python33-relative-import.patch docutils/repos/community-any/PKGBUILD docutils/repos/community-any/python2-docutils.install -----------------------------------+ 01-python33-relative-import.patch | 392 ++++++++++++++++++------------------ PKGBUILD | 160 +++++++------- python2-docutils.install | 18 - 3 files changed, 285 insertions(+), 285 deletions(-) Deleted: 01-python33-relative-import.patch =================================================================== --- 01-python33-relative-import.patch 2013-07-27 17:49:24 UTC (rev 94594) +++ 01-python33-relative-import.patch 2013-07-27 17:49:30 UTC (rev 94595) @@ -1,196 +0,0 @@ -From 12e5aa7b94e0a0ec37e754527e06707005d28d1c Mon Sep 17 00:00:00 2001 -From: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> -Date: Wed, 11 Jul 2012 12:25:14 +0000 -Subject: [PATCH] Fix [3541369] Relative __import__ also with Python 3.3. - -git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk@7486 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 ---- - docutils/HISTORY.txt | 1 + - docutils/docutils/_compat.py | 11 +++++++++++ - docutils/docutils/languages/__init__.py | 8 ++++++-- - docutils/docutils/parsers/__init__.py | 5 ++++- - .../docutils/parsers/rst/directives/__init__.py | 6 +++++- - .../docutils/parsers/rst/languages/__init__.py | 6 +++++- - docutils/docutils/readers/__init__.py | 5 ++++- - docutils/docutils/writers/__init__.py | 7 +++++-- - 8 files changed, 41 insertions(+), 8 deletions(-) - -diff --git a/docutils/docutils/_compat.py b/docutils/docutils/_compat.py -index 1450534..19654a6 100644 ---- a/docutils/docutils/_compat.py -+++ b/docutils/docutils/_compat.py -@@ -35,3 +35,14 @@ else: - # using this hack since 2to3 "fixes" the relative import - # when using ``from io import BytesIO`` - BytesIO = __import__('io').BytesIO -+ -+if sys.version_info < (2,5): -+ import __builtin__ -+ -+ def __import__(name, globals={}, locals={}, fromlist=[], level=-1): -+ """Compatibility definition for Python 2.4. -+ -+ Silently ignore the `level` argument missing in Python < 2.5. -+ """ -+ # we need the level arg because the default changed in Python 3.3 -+ return __builtin__.__import__(name, globals, locals, fromlist) -diff --git a/docutils/docutils/languages/__init__.py b/docutils/docutils/languages/__init__.py -index 675bb0e..57d3ec2 100644 ---- a/docutils/docutils/languages/__init__.py -+++ b/docutils/docutils/languages/__init__.py -@@ -11,7 +11,11 @@ This package contains modules for language-dependent features of Docutils. - - __docformat__ = 'reStructuredText' - -+import sys -+ - from docutils.utils import normalize_language_tag -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - _languages = {} - -@@ -26,7 +30,7 @@ def get_language(language_code, reporter=None): - if tag in _languages: - return _languages[tag] - try: -- module = __import__(tag, globals(), locals()) -+ module = __import__(tag, globals(), locals(), level=1) - except ImportError: - continue - _languages[tag] = module -@@ -35,6 +39,6 @@ def get_language(language_code, reporter=None): - reporter.warning( - 'language "%s" not supported: ' % language_code + - 'Docutils-generated text will be in English.') -- module = __import__('en', globals(), locals()) -+ module = __import__('en', globals(), locals(), level=1) - _languages[tag] = module # warn only one time! - return module -diff --git a/docutils/docutils/parsers/__init__.py b/docutils/docutils/parsers/__init__.py -index 2683376..341e358 100644 ---- a/docutils/docutils/parsers/__init__.py -+++ b/docutils/docutils/parsers/__init__.py -@@ -8,7 +8,10 @@ This package contains Docutils parser modules. - - __docformat__ = 'reStructuredText' - -+import sys - from docutils import Component -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - - class Parser(Component): -@@ -43,5 +46,5 @@ def get_parser_class(parser_name): - parser_name = parser_name.lower() - if parser_name in _parser_aliases: - parser_name = _parser_aliases[parser_name] -- module = __import__(parser_name, globals(), locals()) -+ module = __import__(parser_name, globals(), locals(), level=1) - return module.Parser -diff --git a/docutils/docutils/parsers/rst/directives/__init__.py b/docutils/docutils/parsers/rst/directives/__init__.py -index b00a676..fdc70d7 100644 ---- a/docutils/docutils/parsers/rst/directives/__init__.py -+++ b/docutils/docutils/parsers/rst/directives/__init__.py -@@ -10,8 +10,12 @@ __docformat__ = 'reStructuredText' - - import re - import codecs -+import sys -+ - from docutils import nodes - from docutils.parsers.rst.languages import en as _fallback_language_module -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - - _directive_registry = { -@@ -109,7 +113,7 @@ def directive(directive_name, language_module, document): - # Error handling done by caller. - return None, messages - try: -- module = __import__(modulename, globals(), locals()) -+ module = __import__(modulename, globals(), locals(), level=1) - except ImportError, detail: - messages.append(document.reporter.error( - 'Error importing directive module "%s" (directive "%s"):\n%s' -diff --git a/docutils/docutils/parsers/rst/languages/__init__.py b/docutils/docutils/parsers/rst/languages/__init__.py -index 53017d7..5a151e4 100644 ---- a/docutils/docutils/parsers/rst/languages/__init__.py -+++ b/docutils/docutils/parsers/rst/languages/__init__.py -@@ -12,7 +12,11 @@ reStructuredText. - - __docformat__ = 'reStructuredText' - -+import sys -+ - from docutils.utils import normalize_language_tag -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - _languages = {} - -@@ -21,7 +25,7 @@ def get_language(language_code): - if tag in _languages: - return _languages[tag] - try: -- module = __import__(tag, globals(), locals()) -+ module = __import__(tag, globals(), locals(), level=1) - except ImportError: - continue - _languages[tag] = module -diff --git a/docutils/docutils/readers/__init__.py b/docutils/docutils/readers/__init__.py -index a28248f..e3e6fb5 100644 ---- a/docutils/docutils/readers/__init__.py -+++ b/docutils/docutils/readers/__init__.py -@@ -8,9 +8,12 @@ This package contains Docutils Reader modules. - - __docformat__ = 'reStructuredText' - -+import sys - - from docutils import utils, parsers, Component - from docutils.transforms import universal -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - - class Reader(Component): -@@ -103,5 +106,5 @@ def get_reader_class(reader_name): - reader_name = reader_name.lower() - if reader_name in _reader_aliases: - reader_name = _reader_aliases[reader_name] -- module = __import__(reader_name, globals(), locals()) -+ module = __import__(reader_name, globals(), locals(), level=1) - return module.Reader -diff --git a/docutils/docutils/writers/__init__.py b/docutils/docutils/writers/__init__.py -index e30dbf6..8fcee0c 100644 ---- a/docutils/docutils/writers/__init__.py -+++ b/docutils/docutils/writers/__init__.py -@@ -8,11 +8,14 @@ This package contains Docutils Writer modules. - - __docformat__ = 'reStructuredText' - -- - import os.path -+import sys -+ - import docutils - from docutils import languages, Component - from docutils.transforms import universal -+if sys.version_info < (2,5): -+ from docutils._compat import __import__ - - - class Writer(Component): -@@ -130,5 +133,5 @@ def get_writer_class(writer_name): - writer_name = writer_name.lower() - if writer_name in _writer_aliases: - writer_name = _writer_aliases[writer_name] -- module = __import__(writer_name, globals(), locals()) -+ module = __import__(writer_name, globals(), locals(), level=1) - return module.Writer --- -1.6.5.GIT - Copied: docutils/repos/community-any/01-python33-relative-import.patch (from rev 94594, docutils/trunk/01-python33-relative-import.patch) =================================================================== --- 01-python33-relative-import.patch (rev 0) +++ 01-python33-relative-import.patch 2013-07-27 17:49:30 UTC (rev 94595) @@ -0,0 +1,196 @@ +From 12e5aa7b94e0a0ec37e754527e06707005d28d1c Mon Sep 17 00:00:00 2001 +From: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> +Date: Wed, 11 Jul 2012 12:25:14 +0000 +Subject: [PATCH] Fix [3541369] Relative __import__ also with Python 3.3. + +git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk@7486 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 +--- + docutils/HISTORY.txt | 1 + + docutils/docutils/_compat.py | 11 +++++++++++ + docutils/docutils/languages/__init__.py | 8 ++++++-- + docutils/docutils/parsers/__init__.py | 5 ++++- + .../docutils/parsers/rst/directives/__init__.py | 6 +++++- + .../docutils/parsers/rst/languages/__init__.py | 6 +++++- + docutils/docutils/readers/__init__.py | 5 ++++- + docutils/docutils/writers/__init__.py | 7 +++++-- + 8 files changed, 41 insertions(+), 8 deletions(-) + +diff --git a/docutils/docutils/_compat.py b/docutils/docutils/_compat.py +index 1450534..19654a6 100644 +--- a/docutils/docutils/_compat.py ++++ b/docutils/docutils/_compat.py +@@ -35,3 +35,14 @@ else: + # using this hack since 2to3 "fixes" the relative import + # when using ``from io import BytesIO`` + BytesIO = __import__('io').BytesIO ++ ++if sys.version_info < (2,5): ++ import __builtin__ ++ ++ def __import__(name, globals={}, locals={}, fromlist=[], level=-1): ++ """Compatibility definition for Python 2.4. ++ ++ Silently ignore the `level` argument missing in Python < 2.5. ++ """ ++ # we need the level arg because the default changed in Python 3.3 ++ return __builtin__.__import__(name, globals, locals, fromlist) +diff --git a/docutils/docutils/languages/__init__.py b/docutils/docutils/languages/__init__.py +index 675bb0e..57d3ec2 100644 +--- a/docutils/docutils/languages/__init__.py ++++ b/docutils/docutils/languages/__init__.py +@@ -11,7 +11,11 @@ This package contains modules for language-dependent features of Docutils. + + __docformat__ = 'reStructuredText' + ++import sys ++ + from docutils.utils import normalize_language_tag ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + _languages = {} + +@@ -26,7 +30,7 @@ def get_language(language_code, reporter=None): + if tag in _languages: + return _languages[tag] + try: +- module = __import__(tag, globals(), locals()) ++ module = __import__(tag, globals(), locals(), level=1) + except ImportError: + continue + _languages[tag] = module +@@ -35,6 +39,6 @@ def get_language(language_code, reporter=None): + reporter.warning( + 'language "%s" not supported: ' % language_code + + 'Docutils-generated text will be in English.') +- module = __import__('en', globals(), locals()) ++ module = __import__('en', globals(), locals(), level=1) + _languages[tag] = module # warn only one time! + return module +diff --git a/docutils/docutils/parsers/__init__.py b/docutils/docutils/parsers/__init__.py +index 2683376..341e358 100644 +--- a/docutils/docutils/parsers/__init__.py ++++ b/docutils/docutils/parsers/__init__.py +@@ -8,7 +8,10 @@ This package contains Docutils parser modules. + + __docformat__ = 'reStructuredText' + ++import sys + from docutils import Component ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + + class Parser(Component): +@@ -43,5 +46,5 @@ def get_parser_class(parser_name): + parser_name = parser_name.lower() + if parser_name in _parser_aliases: + parser_name = _parser_aliases[parser_name] +- module = __import__(parser_name, globals(), locals()) ++ module = __import__(parser_name, globals(), locals(), level=1) + return module.Parser +diff --git a/docutils/docutils/parsers/rst/directives/__init__.py b/docutils/docutils/parsers/rst/directives/__init__.py +index b00a676..fdc70d7 100644 +--- a/docutils/docutils/parsers/rst/directives/__init__.py ++++ b/docutils/docutils/parsers/rst/directives/__init__.py +@@ -10,8 +10,12 @@ __docformat__ = 'reStructuredText' + + import re + import codecs ++import sys ++ + from docutils import nodes + from docutils.parsers.rst.languages import en as _fallback_language_module ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + + _directive_registry = { +@@ -109,7 +113,7 @@ def directive(directive_name, language_module, document): + # Error handling done by caller. + return None, messages + try: +- module = __import__(modulename, globals(), locals()) ++ module = __import__(modulename, globals(), locals(), level=1) + except ImportError, detail: + messages.append(document.reporter.error( + 'Error importing directive module "%s" (directive "%s"):\n%s' +diff --git a/docutils/docutils/parsers/rst/languages/__init__.py b/docutils/docutils/parsers/rst/languages/__init__.py +index 53017d7..5a151e4 100644 +--- a/docutils/docutils/parsers/rst/languages/__init__.py ++++ b/docutils/docutils/parsers/rst/languages/__init__.py +@@ -12,7 +12,11 @@ reStructuredText. + + __docformat__ = 'reStructuredText' + ++import sys ++ + from docutils.utils import normalize_language_tag ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + _languages = {} + +@@ -21,7 +25,7 @@ def get_language(language_code): + if tag in _languages: + return _languages[tag] + try: +- module = __import__(tag, globals(), locals()) ++ module = __import__(tag, globals(), locals(), level=1) + except ImportError: + continue + _languages[tag] = module +diff --git a/docutils/docutils/readers/__init__.py b/docutils/docutils/readers/__init__.py +index a28248f..e3e6fb5 100644 +--- a/docutils/docutils/readers/__init__.py ++++ b/docutils/docutils/readers/__init__.py +@@ -8,9 +8,12 @@ This package contains Docutils Reader modules. + + __docformat__ = 'reStructuredText' + ++import sys + + from docutils import utils, parsers, Component + from docutils.transforms import universal ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + + class Reader(Component): +@@ -103,5 +106,5 @@ def get_reader_class(reader_name): + reader_name = reader_name.lower() + if reader_name in _reader_aliases: + reader_name = _reader_aliases[reader_name] +- module = __import__(reader_name, globals(), locals()) ++ module = __import__(reader_name, globals(), locals(), level=1) + return module.Reader +diff --git a/docutils/docutils/writers/__init__.py b/docutils/docutils/writers/__init__.py +index e30dbf6..8fcee0c 100644 +--- a/docutils/docutils/writers/__init__.py ++++ b/docutils/docutils/writers/__init__.py +@@ -8,11 +8,14 @@ This package contains Docutils Writer modules. + + __docformat__ = 'reStructuredText' + +- + import os.path ++import sys ++ + import docutils + from docutils import languages, Component + from docutils.transforms import universal ++if sys.version_info < (2,5): ++ from docutils._compat import __import__ + + + class Writer(Component): +@@ -130,5 +133,5 @@ def get_writer_class(writer_name): + writer_name = writer_name.lower() + if writer_name in _writer_aliases: + writer_name = _writer_aliases[writer_name] +- module = __import__(writer_name, globals(), locals()) ++ module = __import__(writer_name, globals(), locals(), level=1) + return module.Writer +-- +1.6.5.GIT + Deleted: PKGBUILD =================================================================== --- PKGBUILD 2013-07-27 17:49:24 UTC (rev 94594) +++ PKGBUILD 2013-07-27 17:49:30 UTC (rev 94595) @@ -1,80 +0,0 @@ -# $Id$ -# Maintainer: Sébastien Luttringer <se...@aur.archlinux.org> -# Contributor : Ionut Biru <ib...@archlinux.org> -# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> - -pkgbase=docutils -pkgname=('python-docutils' 'python2-docutils') -pkgver=0.10 -pkgrel=1 -pkgdesc='Set of tools for processing plaintext docs into formats such as HTML, XML, or LaTeX' -arch=('any') -url='http://docutils.sourceforge.net' -license=('custom') -makedepends=('python' 'python2') -source=("http://downloads.sourceforge.net/$pkgbase/$pkgbase-$pkgver.tar.gz") -md5sums=('d8d4660c08302c791b2d71a155a2f4bc') - -build() { - cd $pkgbase-$pkgver -# for _p in "$srcdir"/*.patch; do -# msg2 "${_p##*/}" -# patch -p2 -i "$_p" -# done - python3 setup.py build --build-lib=build/python - find build/python -type f -exec \ - sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python3,' {} \; - python2 setup.py build --build-lib=build/python2 - find build/python2 -type f -exec \ - sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; -} - -check() { - cd $pkgbase-$pkgver - # we need utf locale to valid utf8 tests - export LANG=en_US.UTF-8 - # Disable python3 check - #msg2 'python checks' - #PYTHONPATH="$PWD/build/python/" python3 test3/alltests.py - msg2 'python2 checks' - PYTHONPATH="$PWD/build/python2/" python2 test/alltests.py -} - -package_python-docutils() { - depends=('python') - - cd $pkgbase-$pkgver - python setup.py build --build-lib=build/python \ - install --root="$pkgdir" --optimize=1 - # symlink without .py - for f in "$pkgdir"/usr/bin/*.py; do - ln -s "$(basename $f)" "$pkgdir/usr/bin/$(basename $f .py)" - done - # setup license - install -D -m644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" - install -D -m644 licenses/python* "$pkgdir/usr/share/licenses/$pkgname/" -} - -package_python2-docutils() { - depends=('python2') - provides=("docutils=$pkgver") - replaces=('docutils') - install=python2-docutils.install - - cd $pkgbase-$pkgver - python2 setup.py build --build-lib=build/python2 \ - install --root="$pkgdir" --optimize=1 - # fix python-docutils conflict - for _f in "$pkgdir"/usr/bin/*.py; do - mv -v "$_f" "${_f%.py}2.py" - done - # symlink without .py - for _f in "$pkgdir"/usr/bin/*.py; do - ln -s "$(basename $_f)" "$pkgdir/usr/bin/$(basename $_f .py)" - done - # setup license - install -D -m644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" - install -D -m644 licenses/python* "$pkgdir/usr/share/licenses/$pkgname/" -} - -# vim:set ts=2 sw=2 ft=sh et: Copied: docutils/repos/community-any/PKGBUILD (from rev 94594, docutils/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2013-07-27 17:49:30 UTC (rev 94595) @@ -0,0 +1,80 @@ +# $Id$ +# Maintainer: Sébastien Luttringer +# Contributor : Ionut Biru <ib...@archlinux.org> +# Contributor: Sergej Pupykin <pupykin.s+a...@gmail.com> + +pkgbase=docutils +pkgname=('python-docutils' 'python2-docutils') +pkgver=0.11 +pkgrel=1 +pkgdesc='Set of tools for processing plaintext docs into formats such as HTML, XML, or LaTeX' +arch=('any') +url='http://docutils.sourceforge.net' +license=('custom') +makedepends=('python' 'python2') +source=("http://downloads.sourceforge.net/$pkgbase/$pkgbase-$pkgver.tar.gz") +md5sums=('20ac380a18b369824276864d98ec0ad6') + +build() { + cd $pkgbase-$pkgver +# for _p in "$srcdir"/*.patch; do +# msg2 "${_p##*/}" +# patch -p2 -i "$_p" +# done + python3 setup.py build --build-lib=build/python + find build/python -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python3,' {} \; + python2 setup.py build --build-lib=build/python2 + find build/python2 -type f -exec \ + sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \; +} + +check() { + cd $pkgbase-$pkgver + # we need utf locale to valid utf8 tests + export LANG=en_US.UTF-8 + # Disable python3 check + #msg2 'python checks' + #PYTHONPATH="$PWD/build/python/" python3 test3/alltests.py + msg2 'python2 checks' + PYTHONPATH="$PWD/build/python2/" python2 test/alltests.py +} + +package_python-docutils() { + depends=('python') + + cd $pkgbase-$pkgver + python setup.py build --build-lib=build/python \ + install --root="$pkgdir" --optimize=1 + # symlink without .py + for f in "$pkgdir"/usr/bin/*.py; do + ln -s "$(basename $f)" "$pkgdir/usr/bin/$(basename $f .py)" + done + # setup license + install -D -m644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" + install -D -m644 licenses/python* "$pkgdir/usr/share/licenses/$pkgname/" +} + +package_python2-docutils() { + depends=('python2') + provides=("docutils=$pkgver") + replaces=('docutils') + install=python2-docutils.install + + cd $pkgbase-$pkgver + python2 setup.py build --build-lib=build/python2 \ + install --root="$pkgdir" --optimize=1 + # fix python-docutils conflict + for _f in "$pkgdir"/usr/bin/*.py; do + mv -v "$_f" "${_f%.py}2.py" + done + # symlink without .py + for _f in "$pkgdir"/usr/bin/*.py; do + ln -s "$(basename $_f)" "$pkgdir/usr/bin/$(basename $_f .py)" + done + # setup license + install -D -m644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt" + install -D -m644 licenses/python* "$pkgdir/usr/share/licenses/$pkgname/" +} + +# vim:set ts=2 sw=2 et: Deleted: python2-docutils.install =================================================================== --- python2-docutils.install 2013-07-27 17:49:24 UTC (rev 94594) +++ python2-docutils.install 2013-07-27 17:49:30 UTC (rev 94595) @@ -1,9 +0,0 @@ -post_upgrade() { - [ $(vercmp '0.8.1-2' "$2") -gt 0 ] && cat <<EOF || : -python2-docutils: -rst* binaries have been renamed to rst*2 to avoid conflict with python-docutils -remember to update your scripts -EOF -} - -# vim:set ts=2 sw=2 ft=sh et: Copied: docutils/repos/community-any/python2-docutils.install (from rev 94594, docutils/trunk/python2-docutils.install) =================================================================== --- python2-docutils.install (rev 0) +++ python2-docutils.install 2013-07-27 17:49:30 UTC (rev 94595) @@ -0,0 +1,9 @@ +post_upgrade() { + [ $(vercmp '0.8.1-2' "$2") -gt 0 ] && cat <<EOF || : +python2-docutils: +rst* binaries have been renamed to rst*2 to avoid conflict with python-docutils +remember to update your scripts +EOF +} + +# vim:set ts=2 sw=2 ft=sh et: