Pull requests

#20 Declined
Repository
dhellmann dhellmann
Branch
master

Make mkvirtualenv --python not require full path

Author
  1. Marc Abramowitz
Reviewers
Description

Before:

$ mkvirtualenv -p python2.6 py26
The executable /Users/marca/dev/git-repos/virtualenvwrapper/python2.6 (from --python=/Users/marca/dev/git-repos/virtualenvwrapper/python2.6) does not exist

After:

$ mkvirtualenv -p python2.6 py26
Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
New python executable in py26/bin/python
Please make sure you remove any previous custom paths from your /Users/marca/.pydistutils.cfg file.
Installing setuptools, pip...done.

Fixes: #255

Comments (7)

  1. Doug Hellmann repo owner

    Unfortunately, it turns out "which" is one of those commands that people like to alias. So we have to call it as $(command \which "$interprepter") (see line 50 for an example where the python interpreter is found.

  2. Doug Hellmann repo owner

    It looks like passing the value through unmodified works, and because I have no idea why I did anything else I'll just push up a patch to do that (I hope today). I'll close this pull request, since I can just handle the patch myself. Thanks for pointing out the issue and working through the solution with me!