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
56ef3a09
Commit
56ef3a09
authored
Aug 22, 2018
by
Michael Droettboom
Committed by
GitHub
Aug 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #123 from mdboom/no-full-paths
Don't include full paths in build products
parents
9736ef1d
3c8bcae5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
Makefile
Makefile
+9
-3
cpython/Makefile
cpython/Makefile
+2
-1
tools/buildpkg.py
tools/buildpkg.py
+4
-3
No files found.
Makefile
View file @
56ef3a09
PYODIDE_ROOT
=
$(
abspath
.
)
include
Makefile.envs
FILEPACKAGER
=
emsdk/emsdk/emscripten/tag-1.38.10/tools/file_packager.py
FILEPACKAGER
=
$(PYODIDE_ROOT)
/
emsdk/emsdk/emscripten/tag-1.38.10/tools/file_packager.py
CPYTHONROOT
=
cpython
CPYTHONLIB
=
$(CPYTHONROOT)
/installs/python-
$(PYVERSION)
/lib/python
$(PYMINOR)
...
...
@@ -64,7 +64,10 @@ build/pyodide.asm.js: src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.b
build/pyodide.asm.data
:
root/.built
python
$(FILEPACKAGER)
build/pyodide.asm.data
--preload
root/lib@lib
--js-output
=
build/pyodide.asm.data.js
--use-preload-plugins
(
\
cd
build
;
\
python
$(FILEPACKAGER)
pyodide.asm.data
--preload
../root/lib@lib
--js-output
=
pyodide.asm.data.js
--use-preload-plugins
\
)
uglifyjs build/pyodide.asm.data.js
-o
build/pyodide.asm.data.js
...
...
@@ -136,7 +139,10 @@ build/test.data: $(CPYTHONLIB)
cd
$(CPYTHONLIB)
/test
;
\
find
-type
d
-name
__pycache__
-prune
-exec
rm
-rf
{}
\;
\
)
python
$(FILEPACKAGER)
build/test.data
--preload
$(CPYTHONLIB)
/test@/lib/python3.6/test
--js-output
=
build/test.js
--export-name
=
pyodide
--exclude
\*
.wasm.pre
--exclude
__pycache__
(
\
cd
build
;
\
python
$(FILEPACKAGER)
test.data
--preload
../
$(CPYTHONLIB)
/test@/lib/python3.6/test
--js-output
=
test.js
--export-name
=
pyodide
--exclude
\*
.wasm.pre
--exclude
__pycache__
\
)
uglifyjs build/test.js
-o
build/test.js
...
...
cpython/Makefile
View file @
56ef3a09
...
...
@@ -25,7 +25,8 @@ $(INSTALL)/lib/$(LIB): $(BUILD)/$(LIB)
touch
$(BUILD)
/
$(LIB)
;
\
emmake make
HOSTPYTHON
=
$(HOSTPYTHON)
PYTHON_FOR_BUILD
=
$(HOSTPYTHON)
CROSS_COMPILE
=
yes
inclinstall libinstall
$(LIB)
&&
\
cp
$(LIB)
$(INSTALL)
/lib/
&&
\
cp
$(HOSTINSTALL)
/lib/python
$(PYMINOR)
/
`
$(HOSTPYTHON)
-c
"import sysconfig; print(sysconfig._get_sysconfigdata_name())"
`
.py
$(INSTALL)
/lib/python
$(PYMINOR)
/_sysconfigdata__emscripten_.py
\
cp
$(HOSTINSTALL)
/lib/python
$(PYMINOR)
/
`
$(HOSTPYTHON)
-c
"import sysconfig; print(sysconfig._get_sysconfigdata_name())"
`
.py
$(INSTALL)
/lib/python
$(PYMINOR)
/_sysconfigdata__emscripten_.py
;
\
sed
-i
-e
's#'
"
$(PYODIDE_ROOT)
"
'##g'
$(INSTALL)
/lib/python
$(PYMINOR)
/_sysconfigdata__emscripten_.py
;
\
)
...
...
tools/buildpkg.py
View file @
56ef3a09
...
...
@@ -143,14 +143,15 @@ def package_files(buildpath, srcpath, pkg, args):
subprocess
.
run
([
'python'
,
Path
(
os
.
environ
[
'EMSCRIPTEN'
])
/
'tools'
/
'file_packager.py'
,
buildpath
/
(
name
+
'.data'
)
,
name
+
'.data'
,
'--preload'
,
'{}@/lib/python3.6/site-packages'
.
format
(
libdir
),
'--js-output={}'
.
format
(
buildpath
/
(
name
+
'.js'
)
),
'--js-output={}'
.
format
(
name
+
'.js'
),
'--export-name=pyodide'
,
'--exclude'
,
'*.wasm.pre'
,
'--exclude'
,
'__pycache__'
,
'--use-preload-plugins'
],
check
=
True
)
'--use-preload-plugins'
],
cwd
=
buildpath
,
check
=
True
)
subprocess
.
run
([
'uglifyjs'
,
buildpath
/
(
name
+
'.js'
),
...
...
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