Python package install using pip to source doesn't create a symlink

So I'm a convert with pip and virtualenv. One of the things I've found is that when I use a requirements.txt with contents which look like this the subsequent pip -E -r requirements.txt works as intended..

But when you start getting fancy with your requirements.txt by pulling source trees, the following behavior is seen. 1) It pull the source into "source" tree. (That's good) 2) It fails to create a symlink to this in the site-packages tree but rather create *.link (.ie django-debug-toolbar.egg-link )

The problem is that now I have to create the symlink to the source tree from the site-packages tree. To fix this I shift over to the site-packages tree and start creating symlinks back to the sources tree.

I'm sure there is a better way to do this - can someone please enlighten me??

Best Answer

You don't have to create a symlink at all, the so called *.egg-link files in the site-packages directory of the virtualenv will act as a symlink on Python (well, actually setuptools) level.