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
7fac9662
Commit
7fac9662
authored
Jun 22, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix glitches in last few commits
parent
cb939562
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
18 deletions
+20
-18
tools/buildall
tools/buildall
+4
-4
tools/buildpkg.py
tools/buildpkg.py
+4
-4
tools/common.py
tools/common.py
+3
-1
tools/pywasmcross
tools/pywasmcross
+9
-9
No files found.
tools/buildall
View file @
7fac9662
...
...
@@ -63,16 +63,16 @@ def parse_args():
'output'
,
type
=
str
,
nargs
=
1
,
help
=
'Output directory in which to put all built packages'
)
parser
.
add_argument
(
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTCFLAGS
]
,
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTCFLAGS
,
help
=
'Extra compiling flags'
)
parser
.
add_argument
(
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTLDFLAGS
]
,
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTLDFLAGS
,
help
=
'Extra linking flags'
)
parser
.
add_argument
(
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
HOSTPYTHON
]
,
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
HOSTPYTHON
,
help
=
'The path to the host Python installation'
)
parser
.
add_argument
(
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
TARGETPYTHON
]
,
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
TARGETPYTHON
,
help
=
'The path to the target Python installation'
)
return
parser
.
parse_args
()
...
...
tools/buildpkg.py
View file @
7fac9662
...
...
@@ -179,16 +179,16 @@ def parse_args():
'package'
,
type
=
str
,
nargs
=
1
,
help
=
"Path to meta.yaml package description"
)
parser
.
add_argument
(
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTCFLAGS
]
,
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTCFLAGS
,
help
=
'Extra compiling flags'
)
parser
.
add_argument
(
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTLDFLAGS
]
,
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTLDFLAGS
,
help
=
'Extra linking flags'
)
parser
.
add_argument
(
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
HOSTPYTHON
]
,
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
HOSTPYTHON
,
help
=
'The path to the host Python installation'
)
parser
.
add_argument
(
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
TARGETPYTHON
]
,
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
TARGETPYTHON
,
help
=
'The path to the target Python installation'
)
return
parser
.
parse_args
()
...
...
tools/common.py
View file @
7fac9662
import
os
import
yaml
ROOTDIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
...
...
@@ -21,6 +20,9 @@ DEFAULTLDFLAGS = ' '.join([
def
parse_package
(
package
):
# Import yaml here because pywasmcross needs to run in the built native
# Python, which won't have PyYAML
import
yaml
# TODO: Validate against a schema
with
open
(
package
)
as
fd
:
return
yaml
.
load
(
fd
)
tools/pywasmcross
View file @
7fac9662
...
...
@@ -89,7 +89,7 @@ def capture_compile(args):
env
[
'PATH'
]
=
ROOTDIR
+
':'
+
os
.
environ
[
'PATH'
]
result
=
subprocess
.
run
(
[
os
.
path
.
join
(
args
.
host
[
0
]
,
'bin'
,
'python3'
),
[
os
.
path
.
join
(
args
.
host
,
'bin'
,
'python3'
),
'setup.py'
,
'install'
],
env
=
env
)
if
result
.
returncode
!=
0
:
...
...
@@ -119,9 +119,9 @@ def handle_command(line, args):
shared
=
'-shared'
in
line
if
shared
:
new_args
.
extend
(
args
.
ldflags
[
0
]
.
split
())
new_args
.
extend
(
args
.
ldflags
.
split
())
elif
new_args
[
0
]
in
(
'emcc'
,
'em++'
):
new_args
.
extend
(
args
.
cflags
[
0
]
.
split
())
new_args
.
extend
(
args
.
cflags
.
split
())
# Go through and adjust arguments
for
arg
in
line
[
1
:]:
...
...
@@ -129,9 +129,9 @@ def handle_command(line, args):
# Don't include any system directories
if
arg
[
2
:].
startswith
(
'/usr'
):
continue
if
(
os
.
path
.
abspath
(
arg
[
2
:]).
startswith
(
args
.
host
[
0
]
)
and
if
(
os
.
path
.
abspath
(
arg
[
2
:]).
startswith
(
args
.
host
)
and
'site-packages'
not
in
arg
):
arg
=
arg
.
replace
(
'-I'
+
args
.
host
[
0
],
'-I'
+
args
.
target
[
0
]
)
arg
=
arg
.
replace
(
'-I'
+
args
.
host
,
'-I'
+
args
.
target
)
# Don't include any system directories
if
arg
.
startswith
(
'-L/usr'
):
continue
...
...
@@ -194,16 +194,16 @@ def parse_args():
'Cross compile a Python distutils package. '
'Run from the root directory of the package
\
'
s source'
)
parser
.
add_argument
(
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTCFLAGS
]
,
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTCFLAGS
,
help
=
'Extra compiling flags'
)
parser
.
add_argument
(
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
DEFAULTLDFLAGS
]
,
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTLDFLAGS
,
help
=
'Extra linking flags'
)
parser
.
add_argument
(
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
HOSTPYTHON
]
,
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
HOSTPYTHON
,
help
=
'The path to the host Python installation'
)
parser
.
add_argument
(
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
[
common
.
TARGETPYTHON
]
,
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
TARGETPYTHON
,
help
=
'The path to the target Python installation'
)
args
=
parser
.
parse_args
()
return
args
...
...
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