Commit e48756dd authored by Boxiang Sun's avatar Boxiang Sun

Build pyodide in seperated steps

parent 6bf0f27d
[buildout]
# slaposcookbook_recipe_location = ${:parts-directory}/slaposcookbook
extends =
../python3/buildout.cfg
../git/buildout.cfg
../python3/buildout.cfg
../ccache/buildout.cfg
../nodejs/buildout.cfg
../wget/buildout.cfg
../tar/buildout.cfg
../libyaml/buildout.cfg
../python-PyYAML/buildout.cfg
../cmake/buildout.cfg
../bzip2/buildout.cfg
../file/buildout.cfg
../gdbm/buildout.cfg
../gettext/buildout.cfg
../libexpat/buildout.cfg
../libffi/buildout.cfg
../libpng/buildout.cfg
../freetype/buildout.cfg
../pkgconfig/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../readline/buildout.cfg
../sqlite3/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../f2c/buildout.cfg
parts =
pyodide
nodejs
npm
python3.7.2-PyYAML
[node-less]
recipe = slapos.recipe.build:npm
......@@ -29,25 +52,80 @@ environment =
[pyodide-src]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://github.com/iodide-project/pyodide.git
repository = https://lab.nexedi.com/Daetalus/pyodide.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
branch = master
[pyodide-build-interpreter]
recipe = zc.recipe.egg
eggs =
setuptools
${python-PyYAML:egg}
interpreter = ${python3.7.2:executable}
[python3.7.2-PyYAML]
recipe = slapos.recipe.cmmi
python_bin = ${python3.7.2:location}/bin/python3.7
url = https://pyyaml.org/download/pyyaml/PyYAML-3.13.tar.gz
configure-command = true
make-binary = ${:python_bin} setup.py install
environment =
C_INCLUDE_PATH=${libyaml:location}/include
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[pyodide-emsdk]
recipe = slapos.recipe.cmmi
path = ${pyodide-src:location}/emsdk
configure-command= alias python=${python3.7.2:location}/bin/python3 && make clean
make-options = -e
environment =
PATH=${f2c:location}/bin:${python3.7.2:location}/bin:${cmake:location}/bin:${ccache:location}/bin:${gcc:location}/bin:%(PATH)s
CC=${gcc:location}/bin/gcc
CXX=${gcc:location}/bin/g++
LD_LIBRARY_PATH=${libpng:location}/lib:${gcc:location}/lib:${gcc:location}/lib64
PYTHON_EXECUTABLE=${python3.7.2:location}/bin/python3.7
make-targets =
# Build pyodide cpython with custom configuration. Otherwise we will get a cpython without ssl support
# The pyodide cpython **must** been build **AFTER** emsdk
[pyodide-cpython]
recipe = slapos.recipe.cmmi
path = ${pyodide-src:location}/cpython
configure-command = sed -ie "s@./configure --prefix@./configure --with-openssl=${openssl:location} --prefix@" ${pyodide-src:location}/cpython/Makefile && source ${pyodide-emsdk:path}/emsdk/emsdk_env.sh
make-options = -e
environment =
PATH=${xz-utils:location}/bin:${gcc:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include -I${xz-utils:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${xz-utils:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${xz-utils:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
CC=${gcc:location}/bin/gcc
CXX=${gcc:location}/bin/g++
LD_LIBRARY_PATH=${libpng:location}/lib:${gcc:location}/lib:${gcc:location}/lib64
make-targets =
[pyodide-packages]
recipe = slapos.recipe.cmmi
path = ${pyodide-src:location}
configure-command = alias python3=${pyodide-cpython:path}/build/3.7.0/host/bin/python3 && source ${pyodide-emsdk:path}/emsdk/emsdk_env.sh
make-options = -e
make-targets =
environment =
PKG_CONFIG_PATH=${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:$PKG_CONFIG_PATH
PATH=${gcc:location}/bin:${f2c:location}/bin:${pkgconfig:location}/bin:${pyodide-cpython:path}/build/3.7.0/host/bin:${nodejs:location}/bin:${node-less:location}/node_modules/.bin:${node-uglify-js:location}/node_modules/.bin:%(PATH)s
LD_LIBRARY_PATH=${libpng:location}/lib:${gcc:location}/lib:${gcc:location}/lib64
[pyodide]
recipe = slapos.recipe.cmmi
path = ${pyodide-src:location}
configure-command = make -e
make-binary =
make-targets = cp -r ./* ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = echo ${python3.7.2-PyYAML:location} && echo ${pyodide-cpython:path} && echo ${pyodide-emsdk:path} && echo ${node-uglify-js:location} && echo ${node-less:location}# ${pyodide-packages:path}
[pyodide-xxx]
recipe = slapos.recipe.cmmi
path = ${pyodide-src:location}
configure-command = export ${:path}/emsdk/emsdk/emscripten/tag-1.38.22/system/include/
environment =
PATH=${cmake:location}/bin:${ccache:location}/bin:${gcc:location}/bin:${node-less:location}/node_modules/.bin:${node-uglify-js:location}/node_modules/.bin:%(PATH)s
PKG_CONFIG_PATH=${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:$PKG_CONFIG_PATH
PATH=${pkgconfig:location}/bin:${freetype:location}/bin:${nodejs:location}/bin/:${f2c:location}/bin:${python3.7.2:location}/bin:${cmake:location}/bin:${ccache:location}/bin:${gcc:location}/bin:${node-less:location}/node_modules/.bin:${node-uglify-js:location}/node_modules/.bin:${xz-utils:location}/bin:%(PATH)s
CC=${gcc:location}/bin/gcc
CXX=${gcc:location}/bin/g++
LD_LIBRARY_PATH=${gcc:location}/lib:${gcc:location}/lib64
CPPFLAGS=-I${f2c:location}/include -I${zlib:location}/include -I${xz-utils:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LD_LIBRARY_PATH=${libpng:location}/lib:${gcc:location}/lib:${gcc:location}/lib64:${openssl:location}/lib:${readline:location}/lib:${libexpat:location}/lib:${xz-utils:location}/lib:${sqlite3:location}/lib:${gdbm:location}/lib:${bzip2:location}/lib:${ncurses:location}/lib:${libffi:location}/lib
LDFLAGS=-L${zlib:location}/lib -L${xz-utils:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${xz-utils:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
PYTHON_EXECUTABLE=${python3.7.2:location}/bin/python3.7
make-options = -e
configure-command = alias python=${pyodide-build-interpreter:interpreter} && echo $PATH
\ No newline at end of file
configure-command = echo ${python3.7.2-PyYAML:location} && echo ${pyodide-cpython:path}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment