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
3b429e61
Commit
3b429e61
authored
Sep 21, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
0c6b653f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
50 deletions
+38
-50
Makefile.envs
Makefile.envs
+0
-1
bin/pyodide
bin/pyodide
+7
-0
packages/Makefile
packages/Makefile
+1
-1
pyodide_build/__main__.py
pyodide_build/__main__.py
+1
-1
pyodide_build/buildpkg.py
pyodide_build/buildpkg.py
+1
-2
pyodide_build/pywasmcross.py
pyodide_build/pywasmcross.py
+28
-19
setup.py
setup.py
+0
-26
No files found.
Makefile.envs
View file @
3b429e61
export
PATH
:=
$(PYODIDE_ROOT)
/ccache:
$(PYODIDE_ROOT)
/emsdk/emsdk:
$(PYODIDE_ROOT)
/emsdk/emsdk/clang/tag-e1.38.10/build_tag-e1.38.10_64/bin:
$(PYODIDE_ROOT)
/emsdk/emsdk/node/8.9.1_64bit/bin:
$(PYODIDE_ROOT)
/emsdk/emsdk/emscripten/tag-1.38.10:
$(PYODIDE_ROOT)
/emsdk/emsdk/binaryen/tag-1.38.10_64bit_binaryen/bin:
$(PATH)
export
PATH
:=
$(PYODIDE_ROOT)
/ccache:
$(PYODIDE_ROOT)
/emsdk/emsdk:
$(PYODIDE_ROOT)
/emsdk/emsdk/clang/tag-e1.38.10/build_tag-e1.38.10_64/bin:
$(PYODIDE_ROOT)
/emsdk/emsdk/node/8.9.1_64bit/bin:
$(PYODIDE_ROOT)
/emsdk/emsdk/emscripten/tag-1.38.10:
$(PYODIDE_ROOT)
/emsdk/emsdk/binaryen/tag-1.38.10_64bit_binaryen/bin:
$(PATH)
export
PYTHONPATH
:=
$(PYTHONPATH)
:
$(PYODIDE_ROOT)
/
export
EMSDK
=
$(PYODIDE_ROOT)
/emsdk/emsdk
export
EMSDK
=
$(PYODIDE_ROOT)
/emsdk/emsdk
export
EM_CONFIG
=
$(PYODIDE_ROOT)
/emsdk/emsdk/.emscripten
export
EM_CONFIG
=
$(PYODIDE_ROOT)
/emsdk/emsdk/.emscripten
...
...
bin/pyodide
0 → 100755
View file @
3b429e61
#!/bin/sh
# get the absolute path to the root directory
ROOTDIR
=
"
$(
cd
${
BASH_SOURCE
%/*
}
/../
;
pwd
)
"
;
export
PYTHONPATH
=
"
${
PYTHONPATH
}
:
${
ROOTDIR
}
"
python
-m
pyodide_build
"
$@
"
packages/Makefile
View file @
3b429e61
...
@@ -2,7 +2,7 @@ PYODIDE_ROOT=$(abspath ..)
...
@@ -2,7 +2,7 @@ PYODIDE_ROOT=$(abspath ..)
include
../Makefile.envs
include
../Makefile.envs
all
:
all
:
python
-m
pyodide_build
buildall
.
../build
\
../bin/pyodide
buildall
.
../build
\
--ldflags
=
"
$(SIDE_LDFLAGS)
"
--host
=
$(HOSTPYTHONROOT)
--target
=
$(TARGETPYTHONROOT)
--ldflags
=
"
$(SIDE_LDFLAGS)
"
--host
=
$(HOSTPYTHONROOT)
--target
=
$(TARGETPYTHONROOT)
clean
:
clean
:
...
...
pyodide_build/__main__.py
View file @
3b429e61
...
@@ -7,7 +7,7 @@ from . import pywasmcross
...
@@ -7,7 +7,7 @@ from . import pywasmcross
def
main
():
def
main
():
main_parser
=
argparse
.
ArgumentParser
()
main_parser
=
argparse
.
ArgumentParser
(
prog
=
'pyodide'
)
subparsers
=
main_parser
.
add_subparsers
(
help
=
'action'
)
subparsers
=
main_parser
.
add_subparsers
(
help
=
'action'
)
for
command_name
,
module
in
((
"buildpkg"
,
buildpkg
),
for
command_name
,
module
in
((
"buildpkg"
,
buildpkg
),
...
...
pyodide_build/buildpkg.py
View file @
3b429e61
...
@@ -85,8 +85,7 @@ def compile(path, srcpath, pkg, args):
...
@@ -85,8 +85,7 @@ def compile(path, srcpath, pkg, args):
try
:
try
:
subprocess
.
run
([
subprocess
.
run
([
str
(
Path
(
args
.
host
)
/
'bin'
/
'python3'
),
str
(
Path
(
args
.
host
)
/
'bin'
/
'python3'
),
'-m'
,
'pyodide_build'
,
'-m'
,
'pyodide_build'
,
'pywasmcross'
,
'pywasmcross'
,
'--cflags'
,
'--cflags'
,
args
.
cflags
+
' '
+
args
.
cflags
+
' '
+
pkg
.
get
(
'build'
,
{}).
get
(
'cflags'
,
''
),
pkg
.
get
(
'build'
,
{}).
get
(
'cflags'
,
''
),
...
...
pyodide_build/pywasmcross.py
View file @
3b429e61
...
@@ -208,25 +208,30 @@ def build_wrap(args):
...
@@ -208,25 +208,30 @@ def build_wrap(args):
def
make_parser
(
parser
):
def
make_parser
(
parser
):
parser
.
description
=
(
basename
=
Path
(
sys
.
argv
[
0
]).
name
'Cross compile a Python distutils package. '
if
basename
in
symlinks
:
'Run from the root directory of the package
\
'
s source'
)
# skip parsing of all arguments
parser
.
add_argument
(
parser
.
_actions
=
[]
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTCFLAGS
,
else
:
help
=
'Extra compiling flags'
)
parser
.
description
=
(
parser
.
add_argument
(
'Cross compile a Python distutils package. '
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTLDFLAGS
,
'Run from the root directory of the package
\
'
s source'
)
help
=
'Extra linking flags'
)
parser
.
add_argument
(
parser
.
add_argument
(
'--cflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTCFLAGS
,
'--host'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
HOSTPYTHON
,
help
=
'Extra compiling flags'
)
help
=
'The path to the host Python installation'
)
parser
.
add_argument
(
parser
.
add_argument
(
'--ldflags'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
DEFAULTLDFLAGS
,
'--target'
,
type
=
str
,
nargs
=
'?'
,
default
=
common
.
TARGETPYTHON
,
help
=
'Extra linking flags'
)
help
=
'The path to the target Python installation'
)
parser
.
add_argument
(
'--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
,
help
=
'The path to the target Python installation'
)
return
parser
return
parser
def
main
(
args
,
unknown
=
None
):
def
main
(
args
):
basename
=
Path
(
sys
.
argv
[
0
]).
name
basename
=
Path
(
sys
.
argv
[
0
]).
name
if
basename
in
symlinks
:
if
basename
in
symlinks
:
collect_args
(
basename
)
collect_args
(
basename
)
...
@@ -235,6 +240,10 @@ def main(args, unknown=None):
...
@@ -235,6 +240,10 @@ def main(args, unknown=None):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
parser
=
make_parser
(
argparse
.
ArgumentParser
())
basename
=
Path
(
sys
.
argv
[
0
]).
name
args
,
unknown
=
parser
.
parse_known_args
()
if
basename
in
symlinks
:
main
(
args
,
unknown
)
main
(
None
)
else
:
parser
=
make_parser
(
argparse
.
ArgumentParser
())
args
=
parser
.
parse_args
()
main
(
args
)
setup.py
deleted
100644 → 0
View file @
0c6b653f
from
setuptools
import
setup
import
sys
from
pyodide_build
import
__version__
if
'install'
in
sys
.
argv
or
'bdist_wheel'
in
sys
.
argv
:
print
(
"Error: pyodode_build is currently not fully standalone, "
"and can only be installed in development mode. Use:
\
n
"
" pip install -e .
\
n
"
"to install it."
)
sys
.
exit
(
1
)
with
open
(
'README.md'
,
'rt'
)
as
fh
:
LONG_DESCRIPTION
=
fh
.
read
()
setup
(
name
=
'pyodide_build'
,
version
=
__version__
,
description
=
'pyodide builder'
,
entry_points
=
{
'console_scripts'
:
[
'pyodide = pyodide_build.__main__:main'
]},
url
=
"https://github.com/iodide-project/pyodide"
,
license
=
'MPL'
,
packages
=
[
'pyodide_build'
])
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