From 4aa67cc35403a8a83472668865896d0f03ea97a0 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 14 Jul 2011 06:49:51 -0500 Subject: [PATCH] fix: change path detection for bin/python when EPD x64 is installed on OSX --- virtualenv.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/virtualenv.py b/virtualenv.py index aa098af2e..befd73310 100755 --- a/virtualenv.py +++ b/virtualenv.py @@ -1295,16 +1295,19 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear): shutil.copyfile(sys.executable, secondary_exe) make_exe(secondary_exe) - if 'Python.framework' in prefix: - logger.debug('MacOSX Python framework detected') - - # Make sure we use the the embedded interpreter inside - # the framework, even if sys.executable points to - # the stub executable in ${sys.prefix}/bin - # See http://groups.google.com/group/python-virtualenv/ - # browse_thread/thread/17cab2f85da75951 - original_python = os.path.join( - prefix, 'Resources/Python.app/Contents/MacOS/Python') + if '.framework' in prefix: + if 'Python.framework' in prefix: + logger.debug('MacOSX Python framework detected') + # Make sure we use the the embedded interpreter inside + # the framework, even if sys.executable points to + # the stub executable in ${sys.prefix}/bin + # See http://groups.google.com/group/python-virtualenv/ + # browse_thread/thread/17cab2f85da75951 + original_python = os.path.join( + prefix, 'Resources/Python.app/Contents/MacOS/Python') + if 'EPD' in prefix: + logger.debug('EPD framework detected') + original_python = os.path.join(prefix, 'bin/python') shutil.copy(original_python, py_executable) # Copy the framework's dylib into the virtual