pypa/pip — pull request #548 by qwcode (2012-05-31 05:44:51+00:00)
Title: --user fixes part 1

per exchange with Paul/Carl, this is part 1 of a breakup of pull request #511
full plan is here: https://gist.github.com/2822510

part 1:

1)
A new system_site_packages option for reset_env, that creates a --system-site-packages virtualenv.
This is needed to test --user install scenarios (coming in subsequest pull requests).
Without this option, the virtualenv created by reset_env doesn't have the user site on the sys.path.

2)
pypi_server.PyPIProxy.setup() now occurs in a sitecustomize.py file (not a pth file).
This was necessary to prevent pkg_resources.working_set corruption (see comment in the code).
An accurate pkg_resources.working_set is required so that pkg_resources.get_distribution (used in pip.req)
can find --user installed distributions