doesn't pollute os.environ.
# END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END
# ===========================================================================
-os.environ['PORTAGE_PYTHON'] = sys.executable
-
def _ensure_default_encoding():
default_encoding = sys.getdefaultencoding().lower().replace('-', '_')
mysettings["PORTAGE_MASTER_PID"] = str(os.getpid())
+ # Set requested Python interpreter for Portage helpers.
+ mysettings['PORTAGE_PYTHON'] = sys.executable
+
# We are disabling user-specific bashrc files.
mysettings["BASH_ENV"] = INVALID_ENV_FILE
os.umask(umask)
if pre_exec:
pre_exec()
-
- # Set requested Python interpreter for Portage helpers.
- env['PORTAGE_PYTHON'] = sys.executable
# And switch to the new process.
os.execve(binary, myargs, env)
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+import sys
import shutil
import tempfile
from portage import os
tmpdir = tempfile.mkdtemp()
try:
env = {}
- env['PORTAGE_PYTHON'] = os.environ['PORTAGE_PYTHON']
+ env['PORTAGE_PYTHON'] = sys.executable
env['PORTAGE_BIN_PATH'] = PORTAGE_BIN_PATH
env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH
env['PORTAGE_BUILDDIR'] = tmpdir