pypa/pip — pull request #724 by qwcode (2012-11-14 05:45:56+00:00)
Title: upper case url reqs not aliased with name.lower() like other forms

consider this requirements file

http://pypi.python.org/packages/source/P/Pygments/Pygments-1.4.tar.gz
pygments-style-solarized

and know that:
1) "Pygments" has an upper case project name in setup.py
2) pygments-style-solarized depends on "pygments" lower case.

what you end up with in site-packages is *both* being installed:

Pygments-1.4-py2.6.egg-info (whats in the req file)
Pygments-1.5-py2.6.egg-info (the latest)

Pygments is not considered the same as "pygments".

this does not happen, when the requirements is this:

Pygments==1.4
pygments-style-solarized

I've also seen cases like this with "Django", where Django is installed with a url link, and some other requirement depends on "django"

the diff here is very small, and I added a test, which required some new packages. the fix amounts to closing a loophole in the way 'unnamed' requirements were being added to the requirement set. they were bypassing the method that adds the lower case alias.