18 February 2013

Virtualenvs and Github

This is a tidy pattern for testing a cutting edge version of some python code from Github:

mkvirtualenv test
pip install -e git://github.com/getpelican/pelican#egg=pelican

What happens is a python egg package ends up at:

$VIRTUAL_ENV/lib/python2.7/site-packages/salt.egg-link

And then you can see:

> cat $VIRTUAL_ENV/lib/python2.7/site-packages/salt.egg-link
/Users/null/.virtualenvs/test/src/salt

You could hack comfortably on the code in that directory, and then when you're finished just delete the folder at $VIRTUAL_ENV to clean up.

:x


Tagged in code