[Python-modules-commits] r21710 - in packages/python-docutils/trunk/debian (3 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Fri May 11 23:46:20 UTC 2012
Date: Friday, May 11, 2012 @ 23:46:18
Author: jwilk
Revision: 21710
Run 2to3 in parallel.
Added:
packages/python-docutils/trunk/debian/patches/parallel-2to3.diff
Modified:
packages/python-docutils/trunk/debian/changelog
packages/python-docutils/trunk/debian/patches/series
Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog 2012-05-11 22:41:12 UTC (rev 21709)
+++ packages/python-docutils/trunk/debian/changelog 2012-05-11 23:46:18 UTC (rev 21710)
@@ -25,8 +25,10 @@
directive. (parsers.rst.directives.misc-encoding.diff)
* Run Python 2.X tests before building Python 3.X code. Previously time
required to build Python 3.X code were wasted if Python 2.X tests failed.
+ * Run 2to3 in parallel (parallel-2to3.diff). Thanks to Julian Taylor for the
+ hint.
- -- Jakub Wilk <jwilk at debian.org> Sat, 12 May 2012 00:15:01 +0200
+ -- Jakub Wilk <jwilk at debian.org> Sat, 12 May 2012 01:40:56 +0200
python-docutils (0.8.1-6) unstable; urgency=low
Added: packages/python-docutils/trunk/debian/patches/parallel-2to3.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/parallel-2to3.diff (rev 0)
+++ packages/python-docutils/trunk/debian/patches/parallel-2to3.diff 2012-05-11 23:46:18 UTC (rev 21710)
@@ -0,0 +1,26 @@
+Description: run 2to3 in parallel
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: not-needed
+Last-Update: 2012-05-12
+
+--- a/setup.py
++++ b/setup.py
+@@ -24,6 +24,18 @@
+
+
+ if sys.version_info >= (3,):
++
++ num_processes = 1
++ for option in os.environ.get('DEB_BUILD_OPTIONS', '').split():
++ if option.startswith('parallel='):
++ num_processes = int(option.split('=', 1)[1])
++ if num_processes > 1:
++ import lib2to3.refactor
++ class RefactoringTool(lib2to3.refactor.MultiprocessRefactoringTool):
++ def refactor(self, items, write=False):
++ return lib2to3.refactor.MultiprocessRefactoringTool.refactor(self, items, write=write, num_processes=num_processes)
++ lib2to3.refactor.RefactoringTool = RefactoringTool
++
+ # copy-convert auxiliary python sources
+ class copy_build_py_2to3(build_py_2to3):
+ """Copy/convert Python source files in given directories recursively.
Modified: packages/python-docutils/trunk/debian/patches/series
===================================================================
--- packages/python-docutils/trunk/debian/patches/series 2012-05-11 22:41:12 UTC (rev 21709)
+++ packages/python-docutils/trunk/debian/patches/series 2012-05-11 23:46:18 UTC (rev 21710)
@@ -4,5 +4,6 @@
testall-no-stdout-stderr-redirect.diff
no-test-skipping.diff
parsers.rst.directives.misc-encoding.diff
+parallel-2to3.diff
move-data-to-usr-share.diff
# dep8.diff
More information about the Python-modules-commits
mailing list