Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e78fec2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Pass -S option to wrapper for python binary."

parents dae8314a 7265e5f9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -12,6 +12,9 @@ PYTHON_BINARY = '%interpreter%'
MAIN_FILE = '%main%'
PYTHON_PATH = 'PYTHONPATH'

# Don't imply 'import site' on initialization
PYTHON_ARG = '-S'

def SearchPathEnv(name):
  search_path = os.getenv('PATH', os.defpath).split(os.pathsep)
  for directory in search_path:
@@ -73,7 +76,7 @@ def Main():
    python_program = FindPythonBinary()
    if python_program is None:
      raise AssertionError('Could not find python binary: ' + PYTHON_BINARY)
    args = [python_program, main_filepath] + args
    args = [python_program, PYTHON_ARG, main_filepath] + args

    os.environ.update(new_env)