summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-05-31 15:31:09 -0700
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-01 07:22:41 +0000
commit4e0a4177632831f761b46d340e7a0934327ff321 (patch)
treeacdb81e136283e3a5338c31185dd170d9bf5c7d8
parent0092e6d9086db04627be798ccb0467c32289b733 (diff)
downloadmeson-4e0a4177632831f761b46d340e7a0934327ff321.tar.gz
Revert "commandrunner: make run handle python options"
This reverts commit ab599b5733539130db5c4d17c664744f4d5aacaf.
-rw-r--r--mesonbuild/scripts/commandrunner.py24
1 files changed, 3 insertions, 21 deletions
diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py
index 5922c64ed..fc65e5b69 100644
--- a/mesonbuild/scripts/commandrunner.py
+++ b/mesonbuild/scripts/commandrunner.py
@@ -59,27 +59,9 @@ def run(args):
subdir = args[2]
meson_command = args[3]
if 'python' in meson_command: # Hack.
- # Handle any of these:
- # python meson.py ...
- # python -m mesonbuild.mesonmain ...
- # python ARGS -m mesonbuild.mesonmain ...
- # python -m mesonbuild.mesonmain ARGS ...
- i = 4
- while i < len(args):
- arg = args[i]
- # Skip past optional arguments.
- if arg[0] == '-':
- if arg == '-m':
- # Skip past -m PYTHONFILE.
- i += 2
- else:
- i += 1
- else:
- break
- end = i
- meson_command = args[3:end]
- command = args[end]
- arguments = args[end + 1:]
+ meson_command = [meson_command, args[4]]
+ command = args[5]
+ arguments = args[6:]
else:
meson_command = [meson_command]
command = args[4]