summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathy Vanvoorden <mathy@vanvoorden.be>2016-10-17 20:05:23 +0200
committerDavid Seifert <soap@gentoo.org>2016-10-18 22:02:14 +0200
commit53a3edfb4ad26a364e0886465523a342afea118e (patch)
treebe9398b4b240bafd2a1c337407484ad8d9df1bf8 /dev-python/numpy
parentdev-python/numpy: revision bump 1.11.2-r1 (diff)
downloadgentoo-53a3edfb4ad26a364e0886465523a342afea118e.tar.gz
gentoo-53a3edfb4ad26a364e0886465523a342afea118e.tar.bz2
gentoo-53a3edfb4ad26a364e0886465523a342afea118e.zip
dev-python/numpy: fix broken import in version 1.11.2
The patch comes from upstream: https://github.com/numpy/numpy/commit/5d0ce36e5be134bb5ead03cab1edeaa60fa355aa Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=596828 Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/2582 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/files/numpy-1.11.2-import-module-fix.patch27
-rw-r--r--dev-python/numpy/numpy-1.11.2-r1.ebuild6
2 files changed, 32 insertions, 1 deletions
diff --git a/dev-python/numpy/files/numpy-1.11.2-import-module-fix.patch b/dev-python/numpy/files/numpy-1.11.2-import-module-fix.patch
new file mode 100644
index 000000000000..80b710b5b532
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.11.2-import-module-fix.patch
@@ -0,0 +1,27 @@
+From 5d0ce36e5be134bb5ead03cab1edeaa60fa355aa Mon Sep 17 00:00:00 2001
+From: Jonathan Helmus <jjhelmus@gmail.com>
+Date: Wed, 12 Oct 2016 13:07:42 -0500
+Subject: [PATCH] BUG: import full module path in npy_load_module
+
+Use the full module path when importing importlib.machinery for use in the
+npy_load_module function. Just importing importlib is not sufficient in certain
+cases, for example Python 3.4.
+
+closes #8147
+---
+ numpy/compat/py3k.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/compat/py3k.py b/numpy/compat/py3k.py
+index 25cc535..d5bb2e4 100644
+--- a/numpy/compat/py3k.py
++++ b/numpy/compat/py3k.py
+@@ -118,7 +118,7 @@ def npy_load_module(name, fn, info=None):
+ mod : module
+
+ """
+- import importlib
++ import importlib.machinery
+ return importlib.machinery.SourceFileLoader(name, fn).load_module()
+ else:
+ def npy_load_module(name, fn, info=None):
diff --git a/dev-python/numpy/numpy-1.11.2-r1.ebuild b/dev-python/numpy/numpy-1.11.2-r1.ebuild
index a5f25b2b5f92..0013fe1c6f60 100644
--- a/dev-python/numpy/numpy-1.11.2-r1.ebuild
+++ b/dev-python/numpy/numpy-1.11.2-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
@@ -37,6 +37,10 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-1.11.1-no-hardcode-blas.patch
+
+ # This has been fixed upstream but no new release yet
+ # https://github.com/numpy/numpy/commit/5d0ce36e5be134bb5ead03cab1edeaa60fa355aa
+ "${FILESDIR}"/${P}-import-module-fix.patch
)
src_unpack() {