Add command to run Python scripts with the current interpreter.

pull/2498/head
Jussi Pakkanen 7 years ago
parent d5a6ab31bf
commit a437cd1955
  1. 6
      mesonbuild/mesonmain.py

@ -303,6 +303,12 @@ def run(args, mainfile=None):
return mconf.run(remaining_args)
elif cmd_name == 'wrap':
return wraptool.run(remaining_args)
elif cmd_name == 'runpython':
import runpy
script_file = remaining_args[0]
sys.argv[1:] = remaining_args[1:]
runpy.run_path(script_file, run_name='__main__')
sys.exit(0)
# No special command? Do the basic setup/reconf.
if len(args) >= 2 and args[0] == '--internal':

Loading…
Cancel
Save