Skip to content

Commit bf08385

Browse files
committed
3.1.49pre
1 parent 62c8dbe commit bf08385

File tree

5 files changed

+44
-36
lines changed

5 files changed

+44
-36
lines changed

config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ fi
4242

4343

4444
#stable
45-
# embind broke after 3.1.34
4645
# export EMFLAVOUR=3.1.34
47-
# export EMFLAVOUR=${EMFLAVOUR:latest}
4846

47+
# embind broke in 3.1.48-tot (coro suspend/resume)
4948

50-
EMFLAVOUR=${EMFLAVOUR:-tot}
49+
#export EMFLAVOUR=${EMFLAVOUR:latest}
50+
export EMFLAVOUR=${EMFLAVOUR:-tot}
5151

5252

5353
# base wasm features pure is "mvp" , "bi" is bigint

python-wasi-sdk.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,22 @@ do
8383
then
8484
echo WASI SDK TODO
8585
> ${SDKROOT}/python3-wasi
86+
87+
# ROOT=/opt/python-wasm-sdk SDKROOT=/opt/python-wasm-sdk
88+
# HOST_PREFIX=/opt/python-wasm-sdk/devices/$(arch)/usr
8689
> ${SDKROOT}/wasm32-wasi-shell.sh
8790

91+
CPU=wasm32 TARGET=wasi \
92+
PYDK_PYTHON_HOST_PLATFORM=wasm32-wasi \
93+
PREFIX=/opt/python-wasm-sdk/devices/wasi/usr \
94+
./scripts/make-shells.sh
95+
96+
cat >> $ROOT/wasm32-wasi-shell.sh <<END
97+
98+
export PS1="[PyDK:wasisdk] \w $ "
99+
100+
END
101+
88102
chmod +x ${SDKROOT}/python3-wasi ${SDKROOT}/wasm32-wasi-shell.sh
89103

90104
mkdir -p src build ${SDKROOT}/devices/wasi ${SDKROOT}/prebuilt/wasisdk

python-wasm-sdk.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,22 @@ do
8383
then
8484
echo WASI SDK TODO
8585
> ${SDKROOT}/python3-wasi
86+
87+
# ROOT=/opt/python-wasm-sdk SDKROOT=/opt/python-wasm-sdk
88+
# HOST_PREFIX=/opt/python-wasm-sdk/devices/$(arch)/usr
8689
> ${SDKROOT}/wasm32-wasi-shell.sh
8790

91+
CPU=wasm32 TARGET=wasi \
92+
PYDK_PYTHON_HOST_PLATFORM=wasm32-wasi \
93+
PREFIX=/opt/python-wasm-sdk/devices/wasi/usr \
94+
./scripts/make-shells.sh
95+
96+
cat >> $ROOT/wasm32-wasi-shell.sh <<END
97+
98+
export PS1="[PyDK:wasisdk] \w $ "
99+
100+
END
101+
88102
chmod +x ${SDKROOT}/python3-wasi ${SDKROOT}/wasm32-wasi-shell.sh
89103

90104
mkdir -p src build ${SDKROOT}/devices/wasi ${SDKROOT}/prebuilt/wasisdk

scripts/cpython-build-emsdk-prebuilt.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. ${CONFIG:-config}
44

5-
CYTHON_REL=${CYTHON_REL:-3.0.1}
5+
CYTHON_REL=${CYTHON_REL:-3.0.5}
66
CYTHON_WHL=${CYTHON:-Cython-${CYTHON_REL}-py2.py3-none-any.whl}
77

88
# all needed for PEP722/723
@@ -39,15 +39,14 @@ $PIP install --upgrade setuptools
3939
# /opt/python-wasm-sdk/python3-wasm setup.py bdist_wheel
4040

4141

42-
# cython get the latest release on gh
42+
# cython get the latest release on gh install on both host python and build python
4343
pushd build
4444
wget -q -c https://github.com/cython/cython/releases/download/${CYTHON_REL}/${CYTHON_WHL}
4545
$HPIP install --upgrade $CYTHON_WHL
4646
popd
4747

4848
$PIP install build/$CYTHON_WHL
4949

50-
5150
# some we want to be certain to have in all minimal rootfs
5251
mkdir -p prebuilt/emsdk/common/site-packages/
5352
for pkg in pyparsing packaging installer pkg_resources

scripts/cpython-build-emsdk.sh

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -316,21 +316,17 @@ library_dirs = $PREFIX/lib
316316
include_dirs = $PREFIX/include
317317
NUMPY
318318

319-
cat > $ROOT/${PYDK_PYTHON_HOST_PLATFORM}-shell.sh <<END
320-
#!/bin/bash
321-
export ROOT=${SDKROOT}
322-
export SDKROOT=${SDKROOT}
323319

324-
export PYBUILD=\${PYBUILD:-$PYBUILD}
325-
export PYMAJOR=\$(echo -n \$PYBUILD|cut -d. -f1)
326-
export PYMINOR=\$(echo -n \$PYBUILD|cut -d. -f2)
320+
. scripts/make-shells.sh
321+
322+
# C/C++/cmake shell
327323

328-
export CARGO_HOME=\${CARGO_HOME:-${SDKROOT}}/rust
329-
export RUSTUP_HOME=\${RUSTUP_HOME:-${SDKROOT}}/rust
330-
mkdir -p \${CARGO_HOME}/bin
331-
export PATH=\${CARGO_HOME}/bin:\$PATH
324+
cat >> $ROOT/${PYDK_PYTHON_HOST_PLATFORM}-shell.sh <<END
332325
333-
export PANDA_PRC_DIR=${SDKROOT}/support
326+
export PS1="[PyDK:emsdk] \w $ "
327+
328+
export PYTHONSTARTUP="${SDKROOT}/support/__EMSCRIPTEN__.py"
329+
> \${HOME}/.pythonrc.py
334330
335331
export EMSDK_QUIET=1
336332
export EM_IGNORE_SANITY=1
@@ -352,28 +348,11 @@ fi
352348
353349
export SYS_PYTHON=${SYS_PYTHON}
354350
export EMSDK_PYTHON=${SYS_PYTHON}
355-
356-
export PATH=${HOST_PREFIX}/bin:\$PATH:\${SDKROOT}/devices/emsdk/usr/bin
357-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
358-
359-
export PLATFORM_TRIPLET=${PYDK_PYTHON_HOST_PLATFORM}
360-
export PREFIX=$PREFIX
361-
export PYTHONPYCACHEPREFIX=${PYTHONPYCACHEPREFIX:-$PYTHONPYCACHEPREFIX}
362-
mkdir -p \$PYTHONPYCACHEPREFIX
363-
364-
# so pip does not think everything in ~/.local is useable
365-
export HOME=${SDKROOT}
366-
367-
export PYTHONDONTWRITEBYTECODE=1
368-
export PYTHONSTARTUP="${SDKROOT}/support/__EMSCRIPTEN__.py"
369-
> \${HOME}/.pythonrc.py
370-
371-
export PS1="[PyDK:wasm] \w $ "
372-
373351
export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__emscripten_
374352
375353
END
376354

355+
# python shell
377356
cat > $HOST_PREFIX/bin/python3-wasm <<END
378357
#!/bin/bash
379358
@@ -404,6 +383,8 @@ END
404383

405384
chmod +x $HOST_PREFIX/bin/python3-wasm
406385

386+
387+
407388
cp -f $HOST_PREFIX/bin/python3-wasm ${SDKROOT}/
408389

409390
# TODO: FIXME:

0 commit comments

Comments
 (0)