Commit 94829842 authored by Roman Yurchak's avatar Roman Yurchak

More patches for ellip_harm_2.pyx that uses ctypes

parent 862f2574
......@@ -19,6 +19,7 @@ jobs:
- run:
name: dependencies
command: |
sudo apt-get update
sudo apt-get install gfortran f2c
# Download BLAS/LAPACK
......
......@@ -22,6 +22,7 @@ source:
- patches/skip-fortran-fails-to-link.patch
- patches/dummy_threading.patch
- patches/skip-blas-imports.patch
- patches/skip_ellip_harm_2_pyx_ctypes.patch
build:
cflags: -I../../CLAPACK-WA/INCLUDE -Wno-implicit-function-declaration
......
commit 5c2a77219d5bd92c48d8d5d5e71ba28228c282a1
commit 771537885db80fb664d5671af5048e445b6fa821
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 8 10:53:11 2018 +0200
Removes files that require LAPACK
diff --git a/scipy/linalg/__init__.py b/scipy/linalg/__init__.py
index fd02851bf..faa6723d2 100644
--- a/scipy/linalg/__init__.py
+++ b/scipy/linalg/__init__.py
@@ -181,13 +181,16 @@ from ._decomp_qz import *
from .decomp_svd import *
from .decomp_schur import *
from ._decomp_polar import *
-from .matfuncs import *
-from .blas import *
-from .lapack import *
-from .special_matrices import *
-from ._solvers import *
-from ._procrustes import *
-from ._decomp_update import *
+try:
+ from .matfuncs import *
+ from .blas import *
+ from .lapack import *
+ from .special_matrices import *
+ from ._solvers import *
+ from ._procrustes import *
+ from ._decomp_update import *
+except ImportError:
+ pass
__all__ = [s for s in dir() if not s.startswith('_')]
diff --git a/scipy/linalg/setup.py b/scipy/linalg/setup.py
index 2c9b9ba22..035b4bb80 100755
--- a/scipy/linalg/setup.py
......
commit 055d7fcf48996f9619ddd68f4ac0ccb611e8706d
commit cfd6c4b18c5f338842d2ee509bfb2d3a3c6f6439
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 15 15:40:48 2018 +0200
......@@ -102,14 +102,14 @@ index ba33fadbe..644a57eaf 100644
cimport numpy as np
cimport cython
diff --git a/scipy/special/_ellip_harm.py b/scipy/special/_ellip_harm.py
index 6972c2ad1..76a828201 100644
index 62e50655e..61e9949cc 100644
--- a/scipy/special/_ellip_harm.py
+++ b/scipy/special/_ellip_harm.py
@@ -1,6 +1,6 @@
from __future__ import division, print_function, absolute_import
-import threading
+import dummy_threadng as threading
+import dummy_threading as threading
import numpy as np
from ._ufuncs import _ellip_harm
commit c72c210becd33a416cdc35467baf666ea3a9bb94
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Wed Oct 24 12:06:53 2018 +0200
Skip _ellip_harm_2.py due to ctypes
diff --git a/scipy/special/__init__.py b/scipy/special/__init__.py
index f013b818e..fb93f4238 100644
--- a/scipy/special/__init__.py
+++ b/scipy/special/__init__.py
@@ -631,7 +631,7 @@ from . import specfun
from . import orthogonal
from .orthogonal import *
from .spfun_stats import multigammaln
-from ._ellip_harm import ellip_harm, ellip_harm_2, ellip_normal
+from ._ellip_harm import ellip_harm, ellip_normal
from .lambertw import lambertw
diff --git a/scipy/special/_ellip_harm.py b/scipy/special/_ellip_harm.py
index 76a828201..fb5804178 100644
--- a/scipy/special/_ellip_harm.py
+++ b/scipy/special/_ellip_harm.py
@@ -4,7 +4,14 @@ import dummy_threadng as threading
import numpy as np
from ._ufuncs import _ellip_harm
-from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm
+
+
+def _raise_error(*cargs, **kwargs):
+ raise NotImplementedError
+
+
+_ellipsoid = _raise_error
+_ellipsoid_norm = _raise_error
# the functions _ellipsoid, _ellipsoid_norm use global variables, the lock
diff --git a/scipy/special/setup.py b/scipy/special/setup.py
index e5efb2e7a..c76ff5a6b 100755
--- a/scipy/special/setup.py
+++ b/scipy/special/setup.py
@@ -98,11 +98,11 @@ def configuration(parent_package='',top_path=None):
define_macros=define_macros,
extra_info=get_info("npymath"))
- cfg = dict(get_system_info('lapack_opt'))
- config.add_extension('_ellip_harm_2',
- sources=['_ellip_harm_2.c', 'sf_error.c',],
- **cfg
- )
+ #cfg = dict(get_system_info('lapack_opt'))
+ #config.add_extension('_ellip_harm_2',
+ # sources=['_ellip_harm_2.c', 'sf_error.c',],
+ # **cfg
+ # )
config.add_data_files('tests/*.py')
config.add_data_files('tests/data/README')
......@@ -5,7 +5,7 @@ from textwrap import dedent
import pytest
sys.path.append(str(Path(__file__).parents[1]))
sys.path.append(str(Path(__file__).parents[2]))
from pyodide_build.common import HOSTPYTHON # noqa: E402
......@@ -23,7 +23,10 @@ def test_scipy_import(selenium_standalone, request):
""")
# supported modules
for module in ['constants', 'fftpack', 'odr', 'sparse']:
for module in ['constants', 'fftpack', 'odr', 'sparse',
'linalg', # heavily patched
'misc', 'ndimage', 'special'
]:
selenium.run(f"import scipy.{module}")
# not yet built modules
......@@ -31,13 +34,10 @@ def test_scipy_import(selenium_standalone, request):
'spatial', # needs sparse
'integrate', # needs special
'interpolate', # needs linalg
'linalg',
'misc', # needs special
'signal', # needs special
'ndimage', # needs special
'stats', # need special
'optimize', # needs minpack2
'special']:
'optimize', # needs _odepack
]:
print(module)
with pytest.raises(JavascriptException) as err:
selenium.run(f"import scipy.{module}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment