Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
94829842
Commit
94829842
authored
Oct 24, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More patches for ellip_harm_2.pyx that uses ctypes
parent
862f2574
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
39 deletions
+73
-39
.circleci/config.yml
.circleci/config.yml
+1
-0
packages/scipy/meta.yaml
packages/scipy/meta.yaml
+1
-0
packages/scipy/patches/disable_modules_with_blas.patch
packages/scipy/patches/disable_modules_with_blas.patch
+1
-29
packages/scipy/patches/dummy_threading.patch
packages/scipy/patches/dummy_threading.patch
+3
-3
packages/scipy/patches/skip_ellip_harm_2_pyx_ctypes.patch
packages/scipy/patches/skip_ellip_harm_2_pyx_ctypes.patch
+60
-0
test/packages/test_scipy.py
test/packages/test_scipy.py
+7
-7
No files found.
.circleci/config.yml
View file @
94829842
...
...
@@ -19,6 +19,7 @@ jobs:
-
run
:
name
:
dependencies
command
:
|
sudo apt-get update
sudo apt-get install gfortran f2c
# Download BLAS/LAPACK
...
...
packages/scipy/meta.yaml
View file @
94829842
...
...
@@ -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
...
...
packages/scipy/patches/disable_modules_with_blas.patch
View file @
94829842
commit
5c2a77219d5bd92c48d8d5d5e71ba28228c282a
1
commit
771537885db80fb664d5671af5048e445b6fa82
1
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
...
...
packages/scipy/patches/dummy_threading.patch
View file @
94829842
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 6
972c2ad1..76a828201
100644
index 6
2e50655e..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_thread
i
ng as threading
import numpy as np
from ._ufuncs import _ellip_harm
packages/scipy/patches/skip_ellip_harm_2_pyx_ctypes.patch
0 → 100644
View file @
94829842
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')
test/test_scipy.py
→
test/
packages/
test_scipy.py
View file @
94829842
...
...
@@ -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
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment