From a437cd1955186060a8c5768fef739830d2711d0c Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 15 Oct 2017 21:38:35 +0300 Subject: Add command to run Python scripts with the current interpreter. --- mesonbuild/mesonmain.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 8d5fb85..0491322 100644 --- a/mesonbuild/mesonmain.py +++ b/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': -- cgit v1.1