[Python-modules-commits] r23180 - in packages/sphinx/trunk/debian (3 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Tue Dec 18 21:41:54 UTC 2012
Date: Tuesday, December 18, 2012 @ 21:41:52
Author: jwilk
Revision: 23180
Run 2to3 in parallel.
Added:
packages/sphinx/trunk/debian/patches/parallel_2to3.diff
Modified:
packages/sphinx/trunk/debian/changelog
packages/sphinx/trunk/debian/patches/series
Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog 2012-12-18 21:18:04 UTC (rev 23179)
+++ packages/sphinx/trunk/debian/changelog 2012-12-18 21:41:52 UTC (rev 23180)
@@ -1,8 +1,9 @@
sphinx (1.1.3+dfsg-7) UNRELEASED; urgency=low
* Backport upstream patch for fix compatibility with Docutils 0.10.
+ * Run 2to3 in parallel.
- -- Jakub Wilk <jwilk at debian.org> Tue, 18 Dec 2012 22:10:46 +0100
+ -- Jakub Wilk <jwilk at debian.org> Tue, 18 Dec 2012 22:41:17 +0100
sphinx (1.1.3+dfsg-6) experimental; urgency=low
Added: packages/sphinx/trunk/debian/patches/parallel_2to3.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/parallel_2to3.diff (rev 0)
+++ packages/sphinx/trunk/debian/patches/parallel_2to3.diff 2012-12-18 21:41:52 UTC (rev 23180)
@@ -0,0 +1,31 @@
+Description: run 2to3 in parallel
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: not-needed
+Last-Update: 2012-12-18
+
+--- a/setup.py
++++ b/setup.py
+@@ -67,6 +67,23 @@
+ # The uuid module is new in the stdlib in 2.5
+ requires.append('uuid>=1.30')
+
++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, doctests_only=False):
++ return lib2to3.refactor.MultiprocessRefactoringTool.refactor(
++ self, items,
++ write=write,
++ doctests_only=doctests_only,
++ num_processes=num_processes
++ )
++ lib2to3.refactor.RefactoringTool = RefactoringTool
+
+ # Provide a "compile_catalog" command that also creates the translated
+ # JavaScript files if Babel is available.
Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series 2012-12-18 21:18:04 UTC (rev 23179)
+++ packages/sphinx/trunk/debian/patches/series 2012-12-18 21:41:52 UTC (rev 23180)
@@ -13,3 +13,4 @@
support_python_3.3.diff
l10n_fixes.diff
manpage_writer_docutils_0.10_api.diff
+parallel_2to3.diff
More information about the Python-modules-commits
mailing list