From 7358049baacd5c8cccb518b1a1c434146ae7e16a Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Thu, 25 Oct 2018 13:37:13 +0200 Subject: [PATCH] Skip scipy.optimize._cobyla missing import --- packages/scipy/meta.yaml | 1 + .../patches/skip_optimize_cobyla_import.patch | 20 +++++++++++++++++++ test/packages/test_scipy.py | 8 ++------ 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 packages/scipy/patches/skip_optimize_cobyla_import.patch diff --git a/packages/scipy/meta.yaml b/packages/scipy/meta.yaml index 2a3bf8fc4..4161ee7d0 100644 --- a/packages/scipy/meta.yaml +++ b/packages/scipy/meta.yaml @@ -22,6 +22,7 @@ source: - patches/skip-fortran-fails-to-link.patch - patches/dummy_threading.patch - patches/skip_ellip_harm_2_pyx_ctypes.patch + - patches/skip_optimize_cobyla_import.patch build: cflags: -I../../CLAPACK-WA/INCLUDE -Wno-implicit-function-declaration diff --git a/packages/scipy/patches/skip_optimize_cobyla_import.patch b/packages/scipy/patches/skip_optimize_cobyla_import.patch new file mode 100644 index 000000000..371beb0c7 --- /dev/null +++ b/packages/scipy/patches/skip_optimize_cobyla_import.patch @@ -0,0 +1,20 @@ +commit ca74a1078c3955b06d1ab236bdd13256cb7c2551 +Author: Roman Yurchak +Date: Thu Oct 25 12:43:50 2018 +0200 + + Skip scipy.optimize._cobyla import + +diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py +index 259546035..8b0b6960b 100644 +--- a/scipy/optimize/_minimize.py ++++ b/scipy/optimize/_minimize.py +@@ -29,7 +29,8 @@ from ._trustregion_ncg import _minimize_trust_ncg + # constrained minimization + from .lbfgsb import _minimize_lbfgsb + from .tnc import _minimize_tnc +-from .cobyla import _minimize_cobyla ++#from .cobyla import _minimize_cobyla ++_minimize_cobyla = None + from .slsqp import _minimize_slsqp + + diff --git a/test/packages/test_scipy.py b/test/packages/test_scipy.py index ad1e602e9..fa04c6f04 100644 --- a/test/packages/test_scipy.py +++ b/test/packages/test_scipy.py @@ -24,18 +24,14 @@ def test_scipy_import(selenium_standalone, request): # supported modules for module in ['cluster', 'constants', 'fftpack', 'odr', 'sparse', - 'interpolate', + 'interpolate', 'integrate', 'linalg', 'misc', 'ndimage', 'spatial', 'special' ]: selenium.run(f"import scipy.{module}") # not yet built modules - for module in ['integrate', # needs special - 'signal', # needs special - 'stats', # need special - 'optimize', # needs _odepack - ]: + for module in []: print(module) with pytest.raises(JavascriptException) as err: selenium.run(f"import scipy.{module}")