Skip to content

Commit

Permalink
fix: change path detection for bin/python when EPD x64 is installed o…
Browse files Browse the repository at this point in the history
…n OSX
  • Loading branch information
satra committed Feb 2, 2012
1 parent 9b65564 commit 4aa67cc
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions virtualenv.py
Expand Up @@ -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
Expand Down

0 comments on commit 4aa67cc

Please sign in to comment.