summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2011-12-17 05:36:54 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2011-12-17 05:36:54 +0000
commitf987f8fe36358d42930ef51fedd4b9e93fc41bbf (patch)
treee69dbc5a405e3e8dbfab928ffb61aa88ed1040de /dev-python/numpy
parentwhitespace (diff)
downloadgentoo-2-f987f8fe36358d42930ef51fedd4b9e93fc41bbf.tar.gz
gentoo-2-f987f8fe36358d42930ef51fedd4b9e93fc41bbf.tar.bz2
gentoo-2-f987f8fe36358d42930ef51fedd4b9e93fc41bbf.zip
Added patch for python-3, thanks Johan Bergström, bug #393679
(Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/ChangeLog6
-rw-r--r--dev-python/numpy/files/numpy-1.6.1-import_umath.patch67
-rw-r--r--dev-python/numpy/numpy-1.6.1-r1.ebuild3
3 files changed, 74 insertions, 2 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index 4eab1ae3ed94..f33dbf8952bb 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/numpy
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.154 2011/10/27 17:21:04 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.155 2011/12/17 05:36:54 bicatali Exp $
+
+ 17 Dec 2011; Sébastien Fabbro <bicatali@gentoo.org> numpy-1.6.1-r1.ebuild,
+ +files/numpy-1.6.1-import_umath.patch:
+ Added patch for python-3, thanks Johan Bergström, bug #393679
27 Oct 2011; Justin Lecher <jlec@gentoo.org> numpy-1.6.1-r1.ebuild,
files/numpy-1.6.1-atlas.patch:
diff --git a/dev-python/numpy/files/numpy-1.6.1-import_umath.patch b/dev-python/numpy/files/numpy-1.6.1-import_umath.patch
new file mode 100644
index 000000000000..aedaa2024206
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.6.1-import_umath.patch
@@ -0,0 +1,67 @@
+http://projects.scipy.org/numpy/ticket/1919
+https://github.com/numpy/numpy/commit/4dac50bf1faf2c8189c277ec8f11ead506c243b1
+https://github.com/numpy/numpy/commit/418f070fc67d1ea2b6eae3259e9dcf7a980bbaaf
+
+--- numpy/core/code_generators/generate_ufunc_api.py
++++ numpy/core/code_generators/generate_ufunc_api.py
+@@ -75,14 +75,53 @@
+ return 0;
+ }
+
+-#define import_umath() { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); return; }}
+-
+-#define import_umath1(ret) { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); return ret; }}
+-
+-#define import_umath2(msg, ret) { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; }}
+-
+-#define import_ufunc() { UFUNC_NOFPE if (_import_umath() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.umath failed to import"); }}
++#if PY_VERSION_HEX >= 0x03000000
++#define NUMPY_IMPORT_UMATH_RETVAL NULL
++#else
++#define NUMPY_IMPORT_UMATH_RETVAL
++#endif
+
++#define import_umath() \
++ do {\
++ UFUNC_NOFPE\
++ if (_import_umath() < 0) {\
++ PyErr_Print();\
++ PyErr_SetString(PyExc_ImportError,\
++ "numpy.core.umath failed to import");\
++ return NUMPY_IMPORT_UMATH_RETVAL;\
++ }\
++ } while(0)
++
++#define import_umath1(ret) \
++ do {\
++ UFUNC_NOFPE\
++ if (_import_umath() < 0) {\
++ PyErr_Print();\
++ PyErr_SetString(PyExc_ImportError,\
++ "numpy.core.umath failed to import");\
++ return ret;\
++ }\
++ } while(0)
++
++#define import_umath2(ret, msg) \
++ do {\
++ UFUNC_NOFPE\
++ if (_import_umath() < 0) {\
++ PyErr_Print();\
++ PyErr_SetString(PyExc_ImportError, msg);\
++ return ret;\
++ }\
++ } while(0)
++
++#define import_ufunc() \
++ do {\
++ UFUNC_NOFPE\
++ if (_import_umath() < 0) {\
++ PyErr_Print();\
++ PyErr_SetString(PyExc_ImportError,\
++ "numpy.core.umath failed to import");\
++ }\
++ } while(0)
+
+ #endif
+ """
diff --git a/dev-python/numpy/numpy-1.6.1-r1.ebuild b/dev-python/numpy/numpy-1.6.1-r1.ebuild
index 3c9703402a83..64aca6b47ce3 100644
--- a/dev-python/numpy/numpy-1.6.1-r1.ebuild
+++ b/dev-python/numpy/numpy-1.6.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.1-r1.ebuild,v 1.2 2011/10/27 17:21:04 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.1-r1.ebuild,v 1.3 2011/12/17 05:36:54 bicatali Exp $
EAPI=3
@@ -72,6 +72,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/${P}-atlas.patch
+ epatch "${FILESDIR}"/${P}-import_umath.patch
if use lapack; then
append-ldflags "$(pkg-config --libs-only-other cblas lapack)"