Commit 510d402a authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by hydrargyrum
Browse files

local_run: Allow Python interpreter options

That way you can do "local_run -Wall boobank"
-Wall was previously not working at all, being passed as argv[0], and
gets quickly annoying.
parent 981972c6
Pipeline #278635901 failed with stages
in 62 minutes and 36 seconds
......@@ -2,16 +2,20 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import subprocess
import sys
import os
if len(sys.argv) < 2:
print("Usage: %s SCRIPTNAME [args]" % sys.argv[0])
script = sys.argv[1]
args = sys.argv[2:]
args = sys.argv[1:]
pyargs = []
while args and args[0].startswith('-'):
script = args.pop(0)
project = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
wd = os.path.join(project, 'localconfig')
......@@ -54,5 +58,5 @@
[sys.executable, '-Wall', '-s', spath] + args,
[sys.executable, '-s'] + pyargs + [spath] + args,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment