-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
--extra-search-dir only supports alternative versions for pip. #327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you've verified this in practice, I think it makes sense to fix the docs to match the actual behavior first. |
Also it seems to prefer its own bundled pip against a pip with the same or lesser version in extra-search-dirs... |
@ejucovy , maybe you can respond to this. I think you documented this as working 2 years ago. |
What follows is me creating virtualenvs, firstly with setuptools 1.1.6 in I found this issue because it's warned that http://www.virtualenv.org/en/latest/#the-extra-search-dir-option Has it been fixed without updating the documentation / this issue? ivo@ivosung ~$ mkvirtualenv --extra-search-dir=/home/ivo/dists/ sttest
Running virtualenv with interpreter /usr/bin/python2
New python executable in sttest/bin/python2
Also creating executable in sttest/bin/python
Installing Setuptools.......................................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
(sttest)ivo@ivosung ~$ pip list
pip (1.4.1)
setuptools (1.1.6)
wsgiref (0.1.2)
(sttest)ivo@ivosung ~$ deactivate
ivo@ivosung ~$ rmvirtualenv sttest
Removing sttest...
ivo@ivosung ~$ mkvirtualenv --extra-search-dir=/home/ivo/dists/ sttest
Running virtualenv with interpreter /usr/bin/python2
New python executable in sttest/bin/python2
Also creating executable in sttest/bin/python
Installing Setuptools....................................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
(sttest)ivo@ivosung ~$ pip list
pip (1.4.1)
setuptools (1.1.3)
wsgiref (0.1.2)
(sttest)ivo@ivosung ~$ ls /home/ivo/dists
setuptools-1.1.3.tar.gz
(sttest)ivo@ivosung ~$ deactivate
ivo@ivosung ~$ rmvirtualenv sttest
Removing sttest...
ivo@ivosung ~$ mkvirtualenv sttest
Running virtualenv with interpreter /usr/bin/python2
New python executable in sttest/bin/python2
Also creating executable in sttest/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
(sttest)ivo@ivosung ~$ pip list
pip (1.4.1)
setuptools (0.9.8)
wsgiref (0.1.2) |
@Ivoz interesting. maybe it has been fixed indirectly. let me look and confirm later. |
the -extra-search-dir feature as described in the docs to support alternative versions, only works for pip (and even it's support for pip is pretty limited; see below)
I don't see that it could have ever worked as described.
for distribute and setuptools, alternative archives can be found in an alternative directory, but only if they are the default version, which defeats the point of the feature.
for pip, alternative versions of pip can be found, but only if there is no greater version of pip, in the search dir path.
Details for distribute:
supposing you have an alternative source dist of distribute in an extra dir (i.e. not the
DEFAULT_VERSION
specified in the embedded distribute_setup.py), virtualenv will find that version, butdistribute_setup.py
(as a called script) is only capable of installing theDEFAULT_VERSION
. See thedownload_setuptools
method indistribute_setup.py
and follow the code leading up to it. Btw, any cli arguments passed todistribute_setup.py
are used as install arguments to thepython setup.py install
call for distribute.Details for setuptools:
Supposing you have an alternative version of setuptools in an extra dir (i.e. not the
DEFAULT_VERSION
specified in the embeddedez_setup.py
), virtualenv will find the egg, and pass it as an argument toez_setup.py
(and add it to the PYTHONPATH). Due to the internals of ez_setup.py, what happens is the found version gets installed, then uninstalled, and then theDEFAULT_VERSION
get's installed.The text was updated successfully, but these errors were encountered: