summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2011-01-03 11:14:08 +0000
committerBrian Harring <ferringb@gentoo.org>2011-01-03 11:14:08 +0000
commit19400c636259c92d7768dbdd7d68244db4c4b288 (patch)
tree12ff9735b75f828833911796d1501b698e913070 /dev-python/snakeoil
parentVersion bump (diff)
downloadhistorical-19400c636259c92d7768dbdd7d68244db4c4b288.tar.gz
historical-19400c636259c92d7768dbdd7d68244db4c4b288.tar.bz2
historical-19400c636259c92d7768dbdd7d68244db4c4b288.zip
fix #350215, #330511
Package-Manager: portage-2.2.0_alpha3/cvs/Linux x86_64
Diffstat (limited to 'dev-python/snakeoil')
-rw-r--r--dev-python/snakeoil/ChangeLog12
-rw-r--r--dev-python/snakeoil/Manifest14
-rw-r--r--dev-python/snakeoil/files/snakeoil-0.3.7-multiprocess.patch79
-rw-r--r--dev-python/snakeoil/files/snakeoil-issue-7567-term-invocation.patch70
-rw-r--r--dev-python/snakeoil/snakeoil-0.3.7-r1.ebuild (renamed from dev-python/snakeoil/snakeoil-0.3.7.ebuild)10
5 files changed, 174 insertions, 11 deletions
diff --git a/dev-python/snakeoil/ChangeLog b/dev-python/snakeoil/ChangeLog
index 08dbd63823b4..23419d4fb817 100644
--- a/dev-python/snakeoil/ChangeLog
+++ b/dev-python/snakeoil/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/snakeoil
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/ChangeLog,v 1.35 2010/06/27 09:38:18 ferringb Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/ChangeLog,v 1.36 2011/01/03 11:14:08 ferringb Exp $
+
+*snakeoil-0.3.7-r1 (03 Jan 2011)
+
+ 03 Jan 2011; Brian Harring <ferringb@gentoo.org> -snakeoil-0.3.7.ebuild,
+ +snakeoil-0.3.7-r1.ebuild, +files/snakeoil-0.3.7-multiprocess.patch,
+ +files/snakeoil-issue-7567-term-invocation.patch:
+ Work around python upstream bugs; fixes gentoo bugs #350215 (test failure in
+ formatters) and build failure for py3k behaviour via bug #330511.
*snakeoil-0.3.7 (27 Jun 2010)
diff --git a/dev-python/snakeoil/Manifest b/dev-python/snakeoil/Manifest
index 7ff9853decd6..467bd6cf679d 100644
--- a/dev-python/snakeoil/Manifest
+++ b/dev-python/snakeoil/Manifest
@@ -1,18 +1,20 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX snakeoil-0.3.7-multiprocess.patch 2491 RMD160 b19d4eb8fba2e109f538cfd8b887111172e7fe15 SHA1 0f13277f4685f935741dc45feb6d6c581a3f2edd SHA256 752495e587be4445a17636640aa63ae5313ddd77548f4fc6b00ef45f67d56b2c
+AUX snakeoil-issue-7567-term-invocation.patch 2430 RMD160 7d2e4d59c7ac43e2da71ada005490132e27ee718 SHA1 8307b96de3989747e58dab030816deabcf4def59 SHA256 fe72154c7a3013b26b7192f96bdba103f2a47835b3a7e8482d41ca7de4108ac2
DIST snakeoil-0.3.6.4.tar.bz2 95636 RMD160 7125114464f0755ddfa15d7f8e31c356b2e78394 SHA1 7cd23193a6d802ae41c08fffa6fd0f8582b61a4f SHA256 beb18c3fd9b9f951951cb06919845a84e9603df0fa79288b43f1961bd62fe5bc
DIST snakeoil-0.3.6.5.tar.bz2 95510 RMD160 79d4e895677f6a895d277a4d98446ed4fed01857 SHA1 0e915f1b0a9155909a0d90a4be5edb6ee23e7260 SHA256 57414973ccd8aa1df7650aa5c2e9b1f032901d7730cf36e93e12dafba1d8dce2
DIST snakeoil-0.3.7.tar.bz2 97316 RMD160 9495ac2ac8276bea1cc96998767784f824246a9c SHA1 3602f3ab6cf4b20784ecb1e90f08208888eb6307 SHA256 769e27c5548eccc8b21db5eddae3236d840fbde261f563f9d4381a7068ce0b6c
EBUILD snakeoil-0.3.6.4.ebuild 1402 RMD160 d27a128b878ed19b779a9293e2483dc3ce1a6813 SHA1 9c36aa1588cff31401dceff1a2d596843d84b1aa SHA256 d0d4bc2e4b56ed2afe0bd28099cd324284dc14f444966e2161cf0b8095530fb6
EBUILD snakeoil-0.3.6.5.ebuild 1402 RMD160 d18e39d8d9360f6fcf127c8a474936c77982862b SHA1 063cf77cb028db0d33de63addfec52d3cf909195 SHA256 3fefa0f1c85535391599ec55f3c7ea847130893c144b959d3d5163c1abf543e2
-EBUILD snakeoil-0.3.7.ebuild 1400 RMD160 cd94ecc48d8b824d290acd352b36a6e167052ddf SHA1 c80440b573226cb9dcd0fc3160aa9725a465a590 SHA256 9637c83f4e12aae07e8b54000702fb9ab27843ddf6ee240feaf679c1647b017e
-MISC ChangeLog 4850 RMD160 882e700417f2cfa493e6dc94ac923f5e9886ce2c SHA1 724565c8c4628ae115e2aed2418e965ad9dd83eb SHA256 6a2d46471ce3d328a1e65f677987dbaa616984756f33070cb95cb717603197be
+EBUILD snakeoil-0.3.7-r1.ebuild 1459 RMD160 6bdfd37699af8ed6ef3a917b07a2e03dd71ec278 SHA1 866cdb21c42686a4f0e6907e4ddcff06c82b252d SHA256 f39fc8a002f8da15dda4aba6028ca11fd75b5f54a8dcca221126ab994840f7d7
+MISC ChangeLog 5230 RMD160 4f1ae0749e43ecded8af22b1e5984f9f3047feef SHA1 16801d075a2a7918b548a2248ec7041b54eba47c SHA256 e75e651dae8324f81fb8f6f2c617b872a579f7bed60ee1249399e4d2a4f13da4
MISC metadata.xml 263 RMD160 33d1e2440f53cc20d556d8629ecaebe9205db69b SHA1 527ae61f12d6893ccbd46bb6addec2a868c0c65c SHA256 c93cfff3fe13e72e0bfb83b9e668504226d3edf2c7eb8cd1cfb89fb9a38c0ecd
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.15 (GNU/Linux)
+Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAkwnHHYACgkQsiLx3HvNzgckkQCfethlXyb/PklanGjd5JowOPFa
-/2AAn0lPTRlzuWqQcQfyilcUGHd5AtZ6
-=nZun
+iEYEARECAAYFAk0hr4gACgkQsiLx3HvNzgcECwCgiVfSqcQMpEuvar0ipmua0py3
+5fsAoJ/+9VtGhdR8Qren82xxwccsv1vk
+=b2xi
-----END PGP SIGNATURE-----
diff --git a/dev-python/snakeoil/files/snakeoil-0.3.7-multiprocess.patch b/dev-python/snakeoil/files/snakeoil-0.3.7-multiprocess.patch
new file mode 100644
index 000000000000..5c7b9ffcf098
--- /dev/null
+++ b/dev-python/snakeoil/files/snakeoil-0.3.7-multiprocess.patch
@@ -0,0 +1,79 @@
+From 1a2408eff074901d98a3ba79af6eebd7444a3a8f Mon Sep 17 00:00:00 2001
+From: Brian Harring <ferringb@gmail.com>
+Date: Tue, 28 Dec 2010 03:48:14 -0800
+Subject: [PATCH 1/4] detect python bug 3770 (gentoo bug 330511), and disable multiprocessing for 2to3 conversion
+
+---
+ NEWS | 5 +++++
+ snakeoil/caching_2to3.py | 13 +++++++++++--
+ snakeoil/distutils_extensions.py | 7 ++-----
+ 3 files changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index 1423171..b92a130 100644
+--- a/NEWS
++++ b/NEWS
+@@ -58,6 +58,10 @@ Snakeoil Release Notes
+ other sequence where it evaluates false.
+
+
++* detect python bug 3770 (gentoo bug 330511), and disable multiprocessing
++ for 2to3 conversion if it's found.
++
++
+ snakeoil 0.3.7: June 26th, 2010
+
+ * detect python bug 4660, and disable parallelization in 2to3 conversion if
+@@ -72,6 +76,7 @@ snakeoil 0.3.7: June 26th, 2010
+ for 2.4
+
+
++
+ snakeoil 0.3.6.5: May 21st, 2010
+
+ * add discard method to AtomicWriteFile to intentionally discard the
+diff --git a/snakeoil/caching_2to3.py b/snakeoil/caching_2to3.py
+index 407aba4..4c8a3a8 100755
+--- a/snakeoil/caching_2to3.py
++++ b/snakeoil/caching_2to3.py
+@@ -88,8 +88,17 @@ class caching_mixin(object):
+ class RefactoringTool(caching_mixin, lib2to3.refactor.RefactoringTool):
+ pass
+
+-class MultiprocessRefactoringTool(caching_mixin, lib2to3.refactor.MultiprocessRefactoringTool):
+- pass
++multiprocessing_available = False
++try:
++ import multiprocessing
++ # this is to detect python upstream bug 3770
++ from _multiprocessing import SemLock
++ multiprocessing_available = True
++except ImportError:
++ MultiprocessRefactoringTool = RefactoringTool
++else:
++ class MultiprocessRefactoringTool(caching_mixin, lib2to3.refactor.MultiprocessRefactoringTool):
++ pass
+
+
+ def StdoutRefactoringTool(*args):
+diff --git a/snakeoil/distutils_extensions.py b/snakeoil/distutils_extensions.py
+index 5883672..2c9b6d3 100644
+--- a/snakeoil/distutils_extensions.py
++++ b/snakeoil/distutils_extensions.py
+@@ -234,11 +234,8 @@ class build_py(dst_build_py.build_py):
+
+ assert proc_count >= 1
+
+- if proc_count > 1:
+- try:
+- import multiprocessing
+- except ImportError:
+- proc_count == 1
++ if proc_count > 1 and not caching_2to3.multiprocessing_available:
++ proc_count = 1
+
+ refactor_kls = caching_2to3.MultiprocessRefactoringTool
+
+--
+1.7.3.4
+
diff --git a/dev-python/snakeoil/files/snakeoil-issue-7567-term-invocation.patch b/dev-python/snakeoil/files/snakeoil-issue-7567-term-invocation.patch
new file mode 100644
index 000000000000..5fdf2ee6d181
--- /dev/null
+++ b/dev-python/snakeoil/files/snakeoil-issue-7567-term-invocation.patch
@@ -0,0 +1,70 @@
+diff --git a/snakeoil/test/test_formatters.py b/snakeoil/test/test_formatters.py
+index f6e3038..cf523b2 100644
+--- a/snakeoil/test/test_formatters.py
++++ b/snakeoil/test/test_formatters.py
+@@ -8,6 +8,7 @@
+ # aside from that, tests need heavy expansion
+
+ import os
++import sys
+ import pty
+ import StringIO
+ import tempfile
+@@ -23,6 +24,13 @@ if compatibility.is_py3k:
+ else:
+ mk_tempfile = tempfile.TemporaryFile
+
++sys_ver = sys.version_info[:3]
++if (sys_ver >= (2,6,6) and sys_ver < (2,7)) or sys_ver >= (3,2,0):
++ def issue7567(functor):
++ functor.skip = "issue 7567 patch breaks multiple term invocations, disabled till it's sorted"
++ return functor
++else:
++ issue7567 = lambda x:x
+
+ class native_PlainTextFormatterTest(TestCase):
+
+@@ -178,6 +186,7 @@ class TerminfoFormatterTest(TestCase):
+ self.assertEqual(''.join(output), result,
+ msg="given(%r), expected(%r), got(%r)" % (inputs, output, result))
+
++ @issue7567
+ def test_terminfo(self):
+ esc = '\x1b['
+ stream = mk_tempfile()
+@@ -206,6 +215,9 @@ class TerminfoFormatterTest(TestCase):
+ formatters.TerminfoHatesOurTerminal,
+ formatters.TerminfoFormatter, stream, term='dumb')
+
++ if sys_ver >= (2,6,6) and sys_ver < (2,7):
++ test_terminfo_hates_term.skip = "issue doesn't exist for 2.6.6 till 2.7"
++
+
+ def _with_term(term, func, *args, **kwargs):
+ orig_term = os.environ.get('TERM')
+@@ -232,21 +244,25 @@ def _get_pty_pair(encoding='ascii'):
+
+ class GetFormatterTest(TestCase):
+
++ @issue7567
+ def test_dumb_terminal(self):
+ master, out = _get_pty_pair()
+ formatter = _with_term('dumb', formatters.get_formatter, master)
+ self.failUnless(isinstance(formatter, formatters.PlainTextFormatter))
+
++ @issue7567
+ def test_smart_terminal(self):
+ master, out = _get_pty_pair()
+ formatter = _with_term('xterm', formatters.get_formatter, master)
+ self.failUnless(isinstance(formatter, formatters.TerminfoFormatter))
+
++ @issue7567
+ def test_not_a_tty(self):
+ stream = mk_tempfile()
+ formatter = _with_term('xterm', formatters.get_formatter, stream)
+ self.failUnless(isinstance(formatter, formatters.PlainTextFormatter))
+
++ @issue7567
+ def test_no_fd(self):
+ stream = StringIO.StringIO()
+ formatter = _with_term('xterm', formatters.get_formatter, stream)
diff --git a/dev-python/snakeoil/snakeoil-0.3.7.ebuild b/dev-python/snakeoil/snakeoil-0.3.7-r1.ebuild
index ac4f57024d77..c33eb8bca625 100644
--- a/dev-python/snakeoil/snakeoil-0.3.7.ebuild
+++ b/dev-python/snakeoil/snakeoil-0.3.7-r1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/snakeoil-0.3.7.ebuild,v 1.1 2010/06/27 09:38:18 ferringb Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/snakeoil/snakeoil-0.3.7-r1.ebuild,v 1.1 2011/01/03 11:14:08 ferringb Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
-inherit distutils
+inherit eutils distutils
DESCRIPTION="Miscellaneous python utility code."
HOMEPAGE="http://www.pkgcore.org/"
@@ -21,6 +21,10 @@ RDEPEND=${DEPEND}
DOCS="AUTHORS NEWS"
+src_prepare() {
+ epatch "${FILESDIR}"/*.patch
+}
+
pkg_setup() {
python_pkg_setup