Skip to content

Commit 9789ba4

Browse files
committed
build: Update PyOdide build
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent 5ca58de commit 9789ba4

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,10 @@ jobs:
483483
# Nightly 1.86 as 1.87+ is incompatible with PyOdide as of now
484484
toolchain: nightly-2025-02-01
485485
targets: wasm32-unknown-emscripten
486+
components: rust-src
486487
- uses: actions/setup-python@v5
487488
with:
488-
python-version: 3.12
489+
python-version: 3.13
489490
- run: |
490491
pip install pyodide-build>=0.28.0
491492
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
@@ -494,6 +495,9 @@ jobs:
494495
version: ${{ env.EMSCRIPTEN_VERSION }}
495496
- run: pyodide build
496497
working-directory: ./bindings/python
498+
env:
499+
DEFAULT_CROSS_BUILD_ENV_URL: "https://github.com/pyodide/pyodide/releases/download/0.28.0a3/xbuildenv-0.28.0a3.tar.bz2"
500+
RUSTFLAGS: "-C link-arg=-sSIDE_MODULE=2 -Z link-native-libraries=no -Z emscripten-wasm-eh"
497501

498502
test-ruby:
499503
strategy:

.github/workflows/python-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,10 @@ jobs:
295295
# Nightly 1.86 as 1.87+ is incompatible with PyOdide as of now
296296
toolchain: nightly-2025-02-01
297297
targets: wasm32-unknown-emscripten
298+
components: rust-src
298299
- uses: actions/setup-python@v5
299300
with:
300-
python-version: 3.12
301+
python-version: 3.13
301302
- run: |
302303
pip install pyodide-build>=0.28.0
303304
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
@@ -306,6 +307,9 @@ jobs:
306307
version: ${{ env.EMSCRIPTEN_VERSION }}
307308
- run: pyodide build
308309
working-directory: ./bindings/python
310+
env:
311+
DEFAULT_CROSS_BUILD_ENV_URL: "https://github.com/pyodide/pyodide/releases/download/0.28.0a3/xbuildenv-0.28.0a3.tar.bz2"
312+
RUSTFLAGS: "-C link-arg=-sSIDE_MODULE=2 -Z link-native-libraries=no -Z emscripten-wasm-eh"
309313
- name: Upload wheels
310314
uses: actions/upload-artifact@v4
311315
with:

bindings/python/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[unstable]
2+
build-std = ["std", "panic_abort"]

bindings/python/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ build-backend = "maturin"
4949

5050
[tool.maturin]
5151
strip = true
52+
53+
[tool.pyodide.build]
54+
default_cross_build_env_url = "https://github.com/pyodide/pyodide/releases/download/0.28.0a3/xbuildenv-0.28.0a3.tar.bz2"

0 commit comments

Comments
 (0)