# END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END OF IMPORTS -- END
# ===========================================================================
+_python_interpreter = os.path.realpath(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'] = os.path.realpath(sys.executable)
+ mysettings['PORTAGE_PYTHON'] = portage._python_interpreter
# We are disabling user-specific bashrc files.
mysettings["BASH_ENV"] = INVALID_ENV_FILE
import sys
from portage import os
+from portage import _python_interpreter
from portage import _shell_quote
from portage.const import EBUILD_SH_BINARY
from portage.package.ebuild.config import config
metadata=metadata, root_config=root_config,
type_name='ebuild')
settings.setcpv(pkg)
- settings['PORTAGE_PYTHON'] = os.path.realpath(sys.executable)
+ settings['PORTAGE_PYTHON'] = _python_interpreter
settings['PORTAGE_BUILDDIR'] = os.path.join(
settings['PORTAGE_TMPDIR'], cpv)
settings['T'] = os.path.join(
# 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
+from portage import _python_interpreter
from portage.tests import TestCase
from portage.const import PORTAGE_BIN_PATH
from portage.const import PORTAGE_PYM_PATH
if 'PORTAGE_GRPNAME' in os.environ:
env['PORTAGE_GRPNAME'] = os.environ['PORTAGE_GRPNAME']
- env['PORTAGE_PYTHON'] = os.path.realpath(sys.executable)
+ env['PORTAGE_PYTHON'] = _python_interpreter
env['PORTAGE_BIN_PATH'] = PORTAGE_BIN_PATH
env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH
env['PORTAGE_BUILDDIR'] = tmpdir