sci-libs/scipy: Backport fix for glibc-2.22
authorJustin Lecher <jlec@gentoo.org>
Mon, 26 Oct 2015 08:16:59 +0000 (09:16 +0100)
committerJustin Lecher <jlec@gentoo.org>
Mon, 26 Oct 2015 08:17:03 +0000 (09:17 +0100)
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec@gentoo.org>
sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch [new file with mode: 0644]
sci-libs/scipy/scipy-0.16.1.ebuild

diff --git a/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch b/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch
new file mode 100644 (file)
index 0000000..791d67f
--- /dev/null
@@ -0,0 +1,30 @@
+From 1f5ccd5447ed2796bb8e9506cfbfdb4a82cccfc0 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <ralf.gommers@gmail.com>
+Date: Sat, 24 Oct 2015 18:17:04 +0200
+Subject: [PATCH] TST: fix issue with a ctypes test for integrate on Fedora. 
+ Closes gh-5370
+
+---
+ scipy/integrate/tests/test_quadpack.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/scipy/integrate/tests/test_quadpack.py b/scipy/integrate/tests/test_quadpack.py
+index c3a417c..f384c77 100644
+--- a/scipy/integrate/tests/test_quadpack.py
++++ b/scipy/integrate/tests/test_quadpack.py
+@@ -42,7 +42,14 @@ def setUp(self):
+             file = 'libm.dylib'
+         else:
+             file = 'libm.so'
+-        self.lib = ctypes.CDLL(file)
++
++        try:
++            self.lib = ctypes.CDLL(file)
++        except OSError:
++            # This test doesn't work on some Linux platforms (Fedora for
++            # example) that put an ld script in libm.so - see gh-5370
++            self.skipTest("Ctypes can't import libm.so")
++
+         restype = ctypes.c_double
+         argtypes = (ctypes.c_double,)
+         for name in ['sin', 'cos', 'tan']:
index 33610d66892d4ff7174167a8e63e59737b6714dc..de2289b7e7737dc57796b963a882197e8c510f58 100644 (file)
@@ -102,6 +102,7 @@ python_prepare_all() {
        local PATCHES=(
                "${FILESDIR}"/${PN}-0.12.0-blitz.patch
                "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
+               "${FILESDIR}"/${P}-glibc-2.22-backport.patch
        )
        distutils-r1_python_prepare_all
 }