I have a number of python services that each use virtualenvs. I sometimes rebuild these environments, and would like to save time doing it. mkvirtualenv --system-site-packages
seems close to what I want, but it still has behavior I don't understand.
One package I use is gevent (beta version), which I install directly from GitHub: sudo pip install -e git://github.com/surfly/gevent.git@1.0b4#egg=gevent
. This is done outside of a virtualenv, so it goes into the system's site-packages
. This works fine, and if I create a new virtualenv with --system-site-packages
, it seems to be present, but with a different rev and egg specified:
[msherry@hostname:~]$ mkvirtualenv test --system-site-packages
New python executable in test/bin/python2.7
Also creating executable in test/bin/python
Installing setuptools............done.
Installing pip...............done.
[msherry@hostname:~]$ workon test
[msherry@hostname:~]$ pip freeze|grep gevent
-e git://github.com/surfly/gevent.git@15418fc8ff4460069cf42b4b0341969c54455ddd#egg=gevent-dev
It at least looks installed, though. However, when I run pip install -e git://github.com/surfly/gevent.git@1.0b4#egg=gevent
, the (slow) install process for gevent begins again -- it looks like I gain nothing by using --system-site-packages
.
Ideally, I'd like pip to notice that the version of gevent I'm requesting is already present, and not try to install it again. Is there any way to do what I'm attempting?