File tree Expand file tree Collapse file tree 2 files changed +2
-15
lines changed
Expand file tree Collapse file tree 2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 1313
1414def main ():
1515 default_host_runner = (
16- f "{ WASMTIME } run "
16+ "{WASMTIME} run "
1717 # Set argv0 so that getpath.py can auto-discover the sysconfig data directory.
1818 "--argv0 {ARGV0} "
1919 # Map the checkout to / to load the stdlib from /Lib.
Original file line number Diff line number Diff line change @@ -337,22 +337,9 @@ def configure_wasi_python(context, working_dir):
337337
338338 wasi_build_dir = working_dir .relative_to (CHECKOUT )
339339
340- python_build_dir = BUILD_DIR / "build"
341- lib_dirs = list (python_build_dir .glob ("lib.*" ))
342- assert len (lib_dirs ) == 1 , (
343- f"Expected a single lib.* directory in { python_build_dir } "
344- )
345- lib_dir = os .fsdecode (lib_dirs [0 ])
346- python_version = lib_dir .rpartition ("-" )[- 1 ]
347- sysconfig_data_dir = (
348- f"{ wasi_build_dir } /build/lib.wasi-wasm32-{ python_version } "
349- )
350-
351- # Use PYTHONPATH to include sysconfig data which must be anchored to the
352- # WASI guest's `/` directory.
353340 args = {
354341 "WASMTIME" : "wasmtime" ,
355- "PYTHONPATH " : f"/{ sysconfig_data_dir } " ,
342+ "ARGV0 " : f"/{ wasi_build_dir } /python.wasm " ,
356343 "CHECKOUT" : os .fsdecode (CHECKOUT ),
357344 "WASMTIME_CONFIG_PATH" : os .fsdecode (HERE / "wasmtime.toml" ),
358345 }
You can’t perform that action at this time.
0 commit comments