pypa/pip — pull request #574 by qwcode (2012-06-11 01:30:26+00:00)
Title: --user fixes part 4,  issue #440

this is part 4 of a breakup of pull request #511
full plan is here: https://gist.github.com/2822510

#440: pip install --user tries to uninstall system package

there are a few differences in how this was done in pull #511.
the most important difference deals with the tests correctly "simulating" a global-site/user-site conflict using virtualenvs. (see the comment in the last test added)