@@ -586,37 +586,33 @@ def make_emscripten_python(context, working_dir):
586586 subprocess .check_call ([exec_script , "--version" ])
587587
588588
589- @subdir ("host_dir" )
590- def pythoninfo_emscripten_python (context , working_dir ):
591- """Display build info for the host/Emscripten Python."""
592- call (
593- ["make" , "pythoninfo" ],
594- env = updated_env ({}, context .emsdk_cache ),
595- quiet = context .quiet ,
596- )
597-
598-
599- def run_emscripten_python (context ):
589+ def run_emscripten_python (context , args = None ):
600590 """Run the built emscripten Python."""
601591 host_dir = context .build_paths ["host_dir" ]
602592 exec_script = host_dir / "python.sh"
603593 if not exec_script .is_file ():
604594 print ("Emscripten not built" , file = sys .stderr )
605595 sys .exit (1 )
606596
607- args = context .args
608- # Strip the "--" separator if present
609- if args and args [0 ] == "--" :
610- args = args [1 :]
597+ if args is None :
598+ args = context .args
599+ # Strip the "--" separator if present
600+ if args and args [0 ] == "--" :
601+ args = args [1 :]
611602
612- if context .test :
613- args = load_config_toml ()["test-args" ] + args
614- elif context .pythoninfo :
615- args = load_config_toml ()["pythoninfo-args" ] + args
603+ if context .test :
604+ args = load_config_toml ()["test-args" ] + args
605+ elif context .pythoninfo :
606+ args = load_config_toml ()["pythoninfo-args" ] + args
616607
617608 os .execv (str (exec_script ), [str (exec_script ), * args ])
618609
619610
611+ def pythoninfo_emscripten_python (context ):
612+ """Display build info for the host/Emscripten Python."""
613+ run_emscripten_python (context , ["-m" , "test.pythoninfo" ])
614+
615+
620616def build_target (context ):
621617 """Build one or more targets."""
622618 steps = []
0 commit comments