diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-10-15 21:38:35 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-20 23:08:17 +0200 |
commit | a437cd1955186060a8c5768fef739830d2711d0c (patch) | |
tree | 2bcaa62922ff318880e8cd0c121f5533a66ebde8 /mesonbuild/mesonmain.py | |
parent | d5a6ab31bfbcec9838805c598be75abb036aff87 (diff) | |
download | meson-a437cd1955186060a8c5768fef739830d2711d0c.zip meson-a437cd1955186060a8c5768fef739830d2711d0c.tar.gz meson-a437cd1955186060a8c5768fef739830d2711d0c.tar.bz2 |
Add command to run Python scripts with the current interpreter.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 6 |
1 files changed, 6 insertions, 0 deletions
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': |