From 1aca7a6adf643afde027778f1acbde7226dcea72 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 14 Aug 2010 00:28:36 +0200 Subject: Ensure that all Python processes use the same version of Python. --- pym/portage/__init__.py | 2 ++ pym/portage/tests/ebuild/test_ipc_daemon.py | 2 ++ 2 files changed, 4 insertions(+) (limited to 'pym') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index a6760b245..fb4c66cb1 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -325,6 +325,8 @@ except (ImportError, OSError) as e: # 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('-', '_') diff --git a/pym/portage/tests/ebuild/test_ipc_daemon.py b/pym/portage/tests/ebuild/test_ipc_daemon.py index de548c6f1..4b7406deb 100644 --- a/pym/portage/tests/ebuild/test_ipc_daemon.py +++ b/pym/portage/tests/ebuild/test_ipc_daemon.py @@ -1,6 +1,7 @@ # Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +import os import shutil import tempfile from portage import os @@ -19,6 +20,7 @@ class IpcDaemonTestCase(TestCase): tmpdir = tempfile.mkdtemp() try: env = {} + env['PORTAGE_PYTHON'] = os.environ['PORTAGE_PYTHON'] env['PORTAGE_BIN_PATH'] = PORTAGE_BIN_PATH env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH env['PORTAGE_BUILDDIR'] = tmpdir -- cgit v1.2.3-1-g7c22