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
0c6b653f
Commit
0c6b653f
authored
Sep 21, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert using ROOTDIR instead of TOOLSDIR
parent
8973c286
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
pyodide_build/buildpkg.py
pyodide_build/buildpkg.py
+1
-1
pyodide_build/common.py
pyodide_build/common.py
+3
-4
pyodide_build/pywasmcross.py
pyodide_build/pywasmcross.py
+5
-5
setup.py
setup.py
+2
-2
No files found.
pyodide_build/buildpkg.py
View file @
0c6b653f
...
@@ -122,7 +122,7 @@ def package_files(buildpath, srcpath, pkg, args):
...
@@ -122,7 +122,7 @@ def package_files(buildpath, srcpath, pkg, args):
install_prefix
=
(
srcpath
/
'install'
).
resolve
()
install_prefix
=
(
srcpath
/
'install'
).
resolve
()
subprocess
.
run
([
subprocess
.
run
([
'python'
,
'python'
,
common
.
TOOLS
DIR
/
'file_packager.py'
,
common
.
ROOT
DIR
/
'file_packager.py'
,
name
+
'.data'
,
name
+
'.data'
,
'--lz4'
,
'--lz4'
,
'--preload'
,
'--preload'
,
...
...
pyodide_build/common.py
View file @
0c6b653f
from
pathlib
import
Path
from
pathlib
import
Path
ROOTDIR
=
Path
(
__file__
).
parents
[
1
].
resolve
()
ROOTDIR
=
Path
(
__file__
).
parents
[
1
].
resolve
()
/
'tools'
TOOLSDIR
=
ROOTDIR
/
'tools'
HOSTPYTHON
=
ROOTDIR
/
'..'
/
'cpython'
/
'build'
/
'3.7.0'
/
'host'
HOSTPYTHON
=
ROOTDIR
/
'cpython'
/
'build'
/
'3.7.0'
/
'host'
TARGETPYTHON
=
ROOTDIR
/
'..'
/
'cpython'
/
'installs'
/
'python-3.7.0'
TARGETPYTHON
=
ROOTDIR
/
'cpython'
/
'installs'
/
'python-3.7.0'
DEFAULTCFLAGS
=
''
DEFAULTCFLAGS
=
''
DEFAULTLDFLAGS
=
' '
.
join
([
DEFAULTLDFLAGS
=
' '
.
join
([
'-O3'
,
'-O3'
,
...
...
pyodide_build/pywasmcross.py
View file @
0c6b653f
...
@@ -39,7 +39,7 @@ import sys
...
@@ -39,7 +39,7 @@ import sys
from
pyodide_build
import
common
from
pyodide_build
import
common
TOOLSDIR
=
common
.
TOOLS
DIR
ROOTDIR
=
common
.
ROOT
DIR
symlinks
=
set
([
'cc'
,
'c++'
,
'ld'
,
'ar'
,
'gcc'
])
symlinks
=
set
([
'cc'
,
'c++'
,
'ld'
,
'ar'
,
'gcc'
])
...
@@ -55,8 +55,8 @@ def collect_args(basename):
...
@@ -55,8 +55,8 @@ def collect_args(basename):
# native compiler
# native compiler
env
=
dict
(
os
.
environ
)
env
=
dict
(
os
.
environ
)
path
=
env
[
'PATH'
]
path
=
env
[
'PATH'
]
while
str
(
TOOLS
DIR
)
+
':'
in
path
:
while
str
(
ROOT
DIR
)
+
':'
in
path
:
path
=
path
.
replace
(
str
(
TOOLS
DIR
)
+
':'
,
''
)
path
=
path
.
replace
(
str
(
ROOT
DIR
)
+
':'
,
''
)
env
[
'PATH'
]
=
path
env
[
'PATH'
]
=
path
with
open
(
'build.log'
,
'a'
)
as
fd
:
with
open
(
'build.log'
,
'a'
)
as
fd
:
...
@@ -76,7 +76,7 @@ def make_symlinks(env):
...
@@ -76,7 +76,7 @@ def make_symlinks(env):
"""
"""
exec_path
=
Path
(
__file__
).
resolve
()
exec_path
=
Path
(
__file__
).
resolve
()
for
symlink
in
symlinks
:
for
symlink
in
symlinks
:
symlink_path
=
TOOLS
DIR
/
symlink
symlink_path
=
ROOT
DIR
/
symlink
if
not
symlink_path
.
exists
():
if
not
symlink_path
.
exists
():
symlink_path
.
symlink_to
(
exec_path
)
symlink_path
.
symlink_to
(
exec_path
)
if
symlink
==
'c++'
:
if
symlink
==
'c++'
:
...
@@ -89,7 +89,7 @@ def make_symlinks(env):
...
@@ -89,7 +89,7 @@ def make_symlinks(env):
def
capture_compile
(
args
):
def
capture_compile
(
args
):
env
=
dict
(
os
.
environ
)
env
=
dict
(
os
.
environ
)
make_symlinks
(
env
)
make_symlinks
(
env
)
env
[
'PATH'
]
=
str
(
TOOLS
DIR
)
+
':'
+
os
.
environ
[
'PATH'
]
env
[
'PATH'
]
=
str
(
ROOT
DIR
)
+
':'
+
os
.
environ
[
'PATH'
]
result
=
subprocess
.
run
(
result
=
subprocess
.
run
(
[
Path
(
args
.
host
)
/
'bin'
/
'python3'
,
[
Path
(
args
.
host
)
/
'bin'
/
'python3'
,
...
...
setup.py
View file @
0c6b653f
...
@@ -3,8 +3,8 @@ import sys
...
@@ -3,8 +3,8 @@ import sys
from
pyodide_build
import
__version__
from
pyodide_build
import
__version__
if
'install'
in
sys
.
argv
or
'bdist_wheel'
in
sys
.
argv
:
if
'install'
in
sys
.
argv
or
'bdist_wheel'
in
sys
.
argv
:
print
(
"Error: pyodode_build is currently
for
fully standalone, "
print
(
"Error: pyodode_build is currently
not
fully standalone, "
"and can only be installed in develop mode. Use:
\
n
"
"and can only be installed in develop
ment
mode. Use:
\
n
"
" pip install -e .
\
n
"
" pip install -e .
\
n
"
"to install it."
)
"to install it."
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
...
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