File tree Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Expand file tree Collapse file tree 1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change 1- # pygame -wasm-sdk
1+ # python -wasm-sdk
22Tooling for building CPython+Pygame on WebAssembly
3+
4+
5+ example building from within own pygame git clone tree on ubuntu 20.04 or linux mint :
6+ ``` bash
7+ #! /bin/bash
8+
9+ # in github CI, current working dir would be /home/runner/pygame/pygame.
10+
11+ # update system
12+ sudo apt-get update
13+ sudo apt-get install -y bash python3-pip curl pv
14+
15+ # update cython
16+ pip3 install git+https://github.com/cython/cython.git --upgrade
17+
18+ # update source tree
19+ git clean -f
20+ git pull
21+
22+ # sdk
23+ sudo mkdir -p /opt/python-wasm-sdk && sudo chown $( whoami) /opt/python-wasm-sdk
24+ curl -sL --retry 5 https://github.com/pygame-web/python-wasm-sdk/releases/download/0.1.0/python-wasm-sdk-stable.tar.bz2 \
25+ | tar xvPj \
26+ | pv -f -c -p -l -s 20626 > /dev/null
27+
28+ # build pygame
29+ touch $( find | grep pxd$)
30+ python3 setup.py config cython
31+
32+ /opt/python-wasm-sdk/python3-wasm setup.py -config -auto -sdl2
33+
34+ /opt/python-wasm-sdk/python3-wasm setup.py build
35+
36+ # get static lib
37+ SYS_PYTHON=python3 /opt/python-wasm-sdk/emsdk/upstream/emscripten/emar rcs libpygame.a $( find build/temp.wasm32-* /| grep o$)
38+ ```
You can’t perform that action at this time.
0 commit comments