diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 8d5fb8563..049132222 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':