pypa/pip — pull request #992 by qwcode (2013-06-13 06:43:50+00:00)
Title: Solution for upgrading to the new setuptools 

this pull contains a pip-only solution for upgrading to the new setuptools
(i.e. no more changes required to distribute-0.7 or setuptools-0.7.2)

If Jason releases setuptools-0.8 (that's 2&3 compat), then part of these changes could be removed. Additionally, if Jason decided to proceed with the setuptools-import hack he mentioned in #986, then I think none of this would be required.

posting this as a draft for now, because I'm too tired to look at it or refine it anymore more at the moment, but I think it's working.

I tried a few different solutions (none pretty). This is where I ended up.

these scenarios work:

* with distribute installed (in py2 or py3)
* `pip install -U distribute`

* with setuptools intalled (in py2)
* ` pip install -U setuptools

the change, in brief (read #986 or the code comments if you need more backstory)
* forces the "setuptools" dependency to distribute-0.7 to be processed before distribute itself.
* forces pip to perceive "distribute" as a conflict to setuptools (thereby forcing an uninstall of distribute first)
* uses "python setup.py" directly when working with setuptools (to get around 2to3 problems in py3)
* it also includes a revert of the distribute-skip logic I had put in with #937

this pull is against develop. if we wanted it in a patch, then I could rework against 1.3.X.