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
66fe5feb
Commit
66fe5feb
authored
Nov 01, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better refactoring
parent
fcaad86b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
39 deletions
+21
-39
.circleci/config.yml
.circleci/config.yml
+1
-0
Makefile
Makefile
+0
-4
packages/Makefile
packages/Makefile
+1
-1
packages/scipy/meta.yaml
packages/scipy/meta.yaml
+0
-1
packages/scipy/patches/force_malloc.patch
packages/scipy/patches/force_malloc.patch
+16
-2
packages/scipy/patches/skip_optimize_cobyla_import.patch
packages/scipy/patches/skip_optimize_cobyla_import.patch
+0
-20
pyodide_build/pywasmcross.py
pyodide_build/pywasmcross.py
+3
-11
No files found.
.circleci/config.yml
View file @
66fe5feb
...
@@ -19,6 +19,7 @@ jobs:
...
@@ -19,6 +19,7 @@ jobs:
-
run
:
-
run
:
name
:
dependencies
name
:
dependencies
command
:
|
command
:
|
# TODO: update pyodide-env image with the below
sudo apt-get update
sudo apt-get update
sudo apt-get install gfortran f2c
sudo apt-get install gfortran f2c
...
...
Makefile
View file @
66fe5feb
...
@@ -215,10 +215,6 @@ $(CLAPACK): $(CPYTHONLIB)
...
@@ -215,10 +215,6 @@ $(CLAPACK): $(CPYTHONLIB)
make
-C
CLAPACK
make
-C
CLAPACK
$(CLAPACK)
:
$(CPYTHONLIB)
make
-C
CLAPACK
build/packages.json
:
$(CPYTHONLIB) $(CLAPACK)
build/packages.json
:
$(CPYTHONLIB) $(CLAPACK)
make
-C
packages
make
-C
packages
...
...
packages/Makefile
View file @
66fe5feb
...
@@ -5,7 +5,7 @@ all: deps
...
@@ -5,7 +5,7 @@ all: deps
../bin/pyodide buildall
.
../build
\
../bin/pyodide buildall
.
../build
\
--ldflags
=
"
$(SIDE_LDFLAGS)
"
--host
=
$(HOSTPYTHONROOT)
--target
=
$(TARGETPYTHONROOT)
--ldflags
=
"
$(SIDE_LDFLAGS)
"
--host
=
$(HOSTPYTHONROOT)
--target
=
$(TARGETPYTHONROOT)
deps
:
deps
:
#
Temporary workaround to i
nstall build dependencies
#
I
nstall build dependencies
$(HOSTPYTHON)
-m
pip
install
Cython Tempita
$(HOSTPYTHON)
-m
pip
install
Cython Tempita
clean
:
clean
:
...
...
packages/scipy/meta.yaml
View file @
66fe5feb
...
@@ -22,7 +22,6 @@ source:
...
@@ -22,7 +22,6 @@ source:
-
patches/skip-fortran-fails-to-link.patch
-
patches/skip-fortran-fails-to-link.patch
-
patches/dummy_threading.patch
-
patches/dummy_threading.patch
-
patches/skip_ellip_harm_2_pyx_ctypes.patch
-
patches/skip_ellip_harm_2_pyx_ctypes.patch
-
patches/skip_optimize_cobyla_import.patch
-
patches/fix_mmap.patch
-
patches/fix_mmap.patch
build
:
build
:
...
...
packages/scipy/patches/force_malloc.patch
View file @
66fe5feb
commit
d755dab2147732e9213af29f55ab38c38b7ba8d2
commit
7a5b003922134abd01ae33b0a3e84d006673e9c6
Author: Roman Yurchak <rth.yurchak@pm.me>
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 8 12:13:55 2018 +0200
Date: Mon Oct 8 12:13:55 2018 +0200
Force malloc
Workaround for malloc issues
This aims to avoid the "invalid call target: $_malloc" issues
This aims to avoid the "invalid call target: $_malloc" issues
...
@@ -42,6 +42,20 @@ index 17ba78371..5deca7498 100644
...
@@ -42,6 +42,20 @@ index 17ba78371..5deca7498 100644
from .nonlin import *
from .nonlin import *
from .slsqp import fmin_slsqp
from .slsqp import fmin_slsqp
from .nnls import nnls
from .nnls import nnls
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/scipy/optimize/setup.py b/scipy/optimize/setup.py
diff --git a/scipy/optimize/setup.py b/scipy/optimize/setup.py
index 7d2b987cb..1861e7563 100755
index 7d2b987cb..1861e7563 100755
--- a/scipy/optimize/setup.py
--- a/scipy/optimize/setup.py
...
...
packages/scipy/patches/skip_optimize_cobyla_import.patch
deleted
100644 → 0
View file @
fcaad86b
commit ca74a1078c3955b06d1ab236bdd13256cb7c2551
Author: Roman Yurchak <rth.yurchak@pm.me>
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
pyodide_build/pywasmcross.py
View file @
66fe5feb
...
@@ -238,7 +238,6 @@ def handle_command(line, args, dryrun=False):
...
@@ -238,7 +238,6 @@ def handle_command(line, args, dryrun=False):
lapack_dir
=
None
lapack_dir
=
None
# rebuild = False
# Go through and adjust arguments
# Go through and adjust arguments
for
arg
in
line
[
1
:]:
for
arg
in
line
[
1
:]:
if
arg
.
startswith
(
'-I'
):
if
arg
.
startswith
(
'-I'
):
...
@@ -263,19 +262,11 @@ def handle_command(line, args, dryrun=False):
...
@@ -263,19 +262,11 @@ def handle_command(line, args, dryrun=False):
# Fix for scipy to link to the correct BLAS/LAPACK files
# Fix for scipy to link to the correct BLAS/LAPACK files
if
arg
.
startswith
(
'-L'
)
and
'CLAPACK-WA'
in
arg
:
if
arg
.
startswith
(
'-L'
)
and
'CLAPACK-WA'
in
arg
:
# rebuild = True
out_idx
=
line
.
index
(
'-o'
)
out_idx
=
line
.
index
(
'-o'
)
out_idx
+=
1
out_idx
+=
1
module_name
=
line
[
out_idx
]
module_name
=
line
[
out_idx
]
module_name
=
Path
(
module_name
).
name
.
split
(
'.'
)[
0
]
module_name
=
Path
(
module_name
).
name
.
split
(
'.'
)[
0
]
if
module_name
not
in
[
'_fblas'
,
'_flapack'
,
'_flinalg'
,
'_calc_lwork'
,
'cython_blas'
,
'cython_lapack'
,
'_iterative'
,
'_arpack'
]:
raise
ValueError
(
f"Unsupported module requiring BLAS/LAPACK "
f"
{
module_name
}
in
{
' '
.
join
(
line
)
}
"
)
lapack_dir
=
arg
.
replace
(
'-L'
,
''
)
lapack_dir
=
arg
.
replace
(
'-L'
,
''
)
# For convinience we determine needed scipy link libraries
# For convinience we determine needed scipy link libraries
# here, instead of in patch files
# here, instead of in patch files
...
@@ -288,9 +279,10 @@ def handle_command(line, args, dryrun=False):
...
@@ -288,9 +279,10 @@ def handle_command(line, args, dryrun=False):
arg
=
os
.
path
.
join
(
lapack_dir
,
f"
{
lib_name
}
"
)
arg
=
os
.
path
.
join
(
lapack_dir
,
f"
{
lib_name
}
"
)
new_args
.
append
(
arg
)
new_args
.
append
(
arg
)
new_args
.
extend
([
'-s'
,
'INLINING_LIMIT=5'
,
'--llvm-lto'
,
'1'
])
new_args
.
extend
([
'-s'
,
'INLINING_LIMIT=5'
])
continue
continue
# Use -Os for files that are statically linked to CLAPACK
if
(
arg
.
startswith
(
'-O'
)
and
'CLAPACK'
in
' '
.
join
(
line
)
if
(
arg
.
startswith
(
'-O'
)
and
'CLAPACK'
in
' '
.
join
(
line
)
and
'-L'
in
' '
.
join
(
line
)):
and
'-L'
in
' '
.
join
(
line
)):
new_args
.
append
(
'-Os'
)
new_args
.
append
(
'-Os'
)
...
@@ -300,7 +292,7 @@ def handle_command(line, args, dryrun=False):
...
@@ -300,7 +292,7 @@ def handle_command(line, args, dryrun=False):
# This can only be used for incremental rebuilds -- it generates
# This can only be used for incremental rebuilds -- it generates
# an error during clean build of numpy
# an error during clean build of numpy
# if os.path.isfile(output)
and not rebuild
:
# if os.path.isfile(output):
# print('SKIPPING: ' + ' '.join(new_args))
# print('SKIPPING: ' + ' '.join(new_args))
# return
# return
...
...
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