commit:     a65ec6d62c8bc1c85685e0c1dd0eda12134b177f
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 08:16:59 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Oct 26 08:17:03 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a65ec6d6

sci-libs/scipy: Backport fix for glibc-2.22

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../files/scipy-0.16.1-glibc-2.22-backport.patch   | 30 ++++++++++++++++++++++
 sci-libs/scipy/scipy-0.16.1.ebuild                 |  1 +
 2 files changed, 31 insertions(+)

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
index 0000000..791d67f
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch
@@ -0,0 +1,30 @@
+From 1f5ccd5447ed2796bb8e9506cfbfdb4a82cccfc0 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <ralf.gomm...@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']:

diff --git a/sci-libs/scipy/scipy-0.16.1.ebuild 
b/sci-libs/scipy/scipy-0.16.1.ebuild
index 33610d6..de2289b 100644
--- a/sci-libs/scipy/scipy-0.16.1.ebuild
+++ b/sci-libs/scipy/scipy-0.16.1.ebuild
@@ -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
 }

Reply via email to