From f7432686a4d8630e4d9a1e2b3046dc82424391da Mon Sep 17 00:00:00 2001 From: Thomas Spura Date: Sat, 14 Nov 2015 13:05:41 +0100 Subject: [PATCH] Add upstream patch to fix ctypes test --- scipy-0.16.1-ctyptes-test.patch | 26 ++++++++++++++++++++++++++ scipy.spec | 6 ++++++ 2 files changed, 32 insertions(+) create mode 100644 scipy-0.16.1-ctyptes-test.patch diff --git a/scipy-0.16.1-ctyptes-test.patch b/scipy-0.16.1-ctyptes-test.patch new file mode 100644 index 0000000..b6c2f9d --- /dev/null +++ b/scipy-0.16.1-ctyptes-test.patch @@ -0,0 +1,26 @@ +commit 1f5ccd5447ed2796bb8e9506cfbfdb4a82cccfc0 +Author: Ralf Gommers +Date: Sat Oct 24 18:17:04 2015 +0200 + + TST: fix issue with a ctypes test for integrate on Fedora. Closes gh-5370 + +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 @@ class TestCtypesQuad(TestCase): + 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/scipy.spec b/scipy.spec index f2b7c55..2b836fc 100644 --- a/scipy.spec +++ b/scipy.spec @@ -20,6 +20,7 @@ Group: Development/Libraries License: BSD and Boost and Public Domain Url: http://www.scipy.org Source0: http://downloads.sourceforge.net/scipy/%{name}-%{version}%{?rcver}.tar.gz +Patch0: scipy-0.16.1-ctyptes-test.patch BuildRequires: numpy, python2-devel,f2py BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel @@ -99,6 +100,8 @@ include_dirs = /usr/include/suitesparse umfpack_libs = umfpack EOF +%patch0 -p1 + %build %if 0%{?with_python3} @@ -158,6 +161,9 @@ PYTHONPATH=$RPM_BUILD_ROOT%{python2_sitearch} \ %endif # with_python3 %changelog +* Sat Nov 14 2015 Thomas Spura - 0.16.1-3 +- Add patch to fix ctypes test + * Tue Nov 10 2015 Fedora Release Engineering - 0.16.1-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5