summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-11-15 02:17:14 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-11-15 02:17:14 +0000
commit207af40f5894ca288e84d972f6d846d3c98b1249 (patch)
tree7d65bbb1b8eb52f98d0927f69d1b6fb57831e30b /dev-python/cython
parentVersion bump. (diff)
downloadgentoo-2-207af40f5894ca288e84d972f6d846d3c98b1249.tar.gz
gentoo-2-207af40f5894ca288e84d972f6d846d3c98b1249.tar.bz2
gentoo-2-207af40f5894ca288e84d972f6d846d3c98b1249.zip
Fix building with Python 3.1.3 (bug #344823).
(Portage version: 2.2.0_alpha4_p23/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/cython')
-rw-r--r--dev-python/cython/ChangeLog6
-rw-r--r--dev-python/cython/cython-0.13.ebuild9
-rw-r--r--dev-python/cython/files/cython-0.13-python-3.1.3.patch25
3 files changed, 37 insertions, 3 deletions
diff --git a/dev-python/cython/ChangeLog b/dev-python/cython/ChangeLog
index 629ecdf01e63..c2a2c2eeec16 100644
--- a/dev-python/cython/ChangeLog
+++ b/dev-python/cython/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/cython
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/ChangeLog,v 1.55 2010/11/14 15:11:45 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/ChangeLog,v 1.56 2010/11/15 02:17:14 arfrever Exp $
+
+ 15 Nov 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ cython-0.13.ebuild, +files/cython-0.13-python-3.1.3.patch:
+ Fix building with Python 3.1.3 (bug #344823).
14 Nov 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
-cython-0.12.1.ebuild:
diff --git a/dev-python/cython/cython-0.13.ebuild b/dev-python/cython/cython-0.13.ebuild
index d6f5b4249b73..3dd6bee84ce3 100644
--- a/dev-python/cython/cython-0.13.ebuild
+++ b/dev-python/cython/cython-0.13.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/cython-0.13.ebuild,v 1.6 2010/11/09 19:51:49 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cython/cython-0.13.ebuild,v 1.7 2010/11/15 02:17:14 arfrever Exp $
EAPI="3"
SUPPORT_PYTHON_ABIS="1"
-inherit distutils
+inherit distutils eutils
MY_PN="Cython"
MY_P="${MY_PN}-${PV/_/.}"
@@ -30,6 +30,11 @@ PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
DOCS="ToDo.txt USAGE.txt"
PYTHON_MODNAME="Cython pyximport"
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-python-3.1.3.patch"
+}
+
src_test() {
testing() {
rm -fr BUILD
diff --git a/dev-python/cython/files/cython-0.13-python-3.1.3.patch b/dev-python/cython/files/cython-0.13-python-3.1.3.patch
new file mode 100644
index 000000000000..19e30bef11e1
--- /dev/null
+++ b/dev-python/cython/files/cython-0.13-python-3.1.3.patch
@@ -0,0 +1,25 @@
+http://hg.cython.org/cython-devel/rev/66db6308e5be
+
+--- setup.py
++++ setup.py
+@@ -106,12 +106,19 @@
+ )
+
+ class build_ext(build_ext_orig):
++ # we must keep the original modules alive to make sure
++ # their code keeps working when we remove them from
++ # sys.modules
++ dead_modules = []
++
+ def build_extensions(self):
+ # add path where 2to3 installed the transformed sources
+ # and make sure Python (re-)imports them from there
+ already_imported = [ module for module in sys.modules
+ if module == 'Cython' or module.startswith('Cython.') ]
++ keep_alive = self.dead_modules.append
+ for module in already_imported:
++ keep_alive(sys.modules[module])
+ del sys.modules[module]
+ sys.path.insert(0, os.path.join(source_root, self.build_lib))
+
+