@@ -233,9 +233,10 @@ def configure_wasi_python(context, working_dir):
233233 env = updated_env (env_additions | wasi_sdk_env (context )),
234234 quiet = context .quiet )
235235
236+ python_wasm = working_dir / "python.wasm"
236237 exec_script = working_dir / "python.sh"
237238 with exec_script .open ("w" , encoding = "utf-8" ) as file :
238- file .write (f'#!/bin/sh\n exec { host_runner } "$@"\n ' )
239+ file .write (f'#!/bin/sh\n exec { host_runner } { python_wasm } "$@"\n ' )
239240 exec_script .chmod (0o755 )
240241 print (f"🏃♀️ Created { exec_script } ... " )
241242 sys .stdout .flush ()
@@ -272,9 +273,7 @@ def main():
272273 # Map the checkout to / to load the stdlib from /Lib.
273274 "--dir {HOST_DIR}::{GUEST_DIR} "
274275 # Set PYTHONPATH to the sysconfig data.
275- "--env {ENV_VAR_NAME}={ENV_VAR_VALUE} "
276- # Path to the WASM binary.
277- "{PYTHON_WASM}" )
276+ "--env {ENV_VAR_NAME}={ENV_VAR_VALUE}" )
278277
279278 parser = argparse .ArgumentParser ()
280279 subcommands = parser .add_subparsers (dest = "subcommand" )
@@ -310,8 +309,8 @@ def main():
310309 "$WASI_SDK_PATH or /opt/wasi-sdk" )
311310 subcommand .add_argument ("--host-runner" , action = "store" ,
312311 default = default_host_runner , dest = "host_runner" ,
313- help = "Command template for running the WebAssembly "
314- "code (default meant for wasmtime 14 or newer: "
312+ help = "Command template for running the WASI host "
313+ "(default designed for wasmtime 14 or newer: "
315314 f"`{ default_host_runner } `)" )
316315
317316 context = parser .parse_args ()
0 commit comments