https://github.com/python/cpython/commit/06ba5f48e0ebdb8cfec0f251c61fb10831b23617
commit: 06ba5f48e0ebdb8cfec0f251c61fb10831b23617
branch: 3.12
author: Brett Cannon <[email protected]>
committer: Yhg1s <[email protected]>
date: 2026-08-14T13:42:35Z
summary:
[3.12] GH-155757: Set `--argv0` for wasmtime (#155758)
files:
A Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst
M Tools/wasm/wasm_build.py
diff --git
a/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst
b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst
new file mode 100644
index 000000000000000..5113bc93d937015
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-08-13-12-57-27.gh-issue-155757._5cg0h.rst
@@ -0,0 +1,3 @@
+Set the ``--argv0`` argument to wasmtime for WASI builds so the test suite
+passes. Otherwise the calculated paths to the stdlib for frozen modules is
+incorrect.
diff --git a/Tools/wasm/wasm_build.py b/Tools/wasm/wasm_build.py
index f6e262965665510..6582b570a816b54 100755
--- a/Tools/wasm/wasm_build.py
+++ b/Tools/wasm/wasm_build.py
@@ -318,6 +318,7 @@ def _check_wasi():
"wasmtime run "
"--wasm max-wasm-stack=8388608 "
"--wasi preview2 "
+ "--argv0 /{relbuilddir}/python.wasm "
"--dir {srcdir}::/ "
"--env
PYTHONPATH=/{relbuilddir}/build/lib.wasi-wasm32-{version}:/Lib"
),
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]