The bootstrap that I wrote at the PyCon AU sprints to implement PEP 439 has been added to pypa on bitbucket:
I've also updated the PEP with the following changes:
- mention current plans for HTTPS cert verification in Python 3.4+ (sans PEP reference for now)
- remove setuptools note; setuptools will now be installed
- mention bootstrapping target (user vs. system) and command-line options
- mention python 2.6+ bootstrap possibility
- remove consideration of support for unnecessary installation options (beyond -i/--index-url)
- mention having pip default to --user when itself installed in ~/.local
What the last item alludes to is the idea that it'd be nice if pip installed in ~/.local would default to installing packages also in ~/.local as though the --user switch had been provided. Otherwise the user needs to remember it every time they install a package.
Note that the bootstrapping uses two different flags to control where the pip implementation is installed: --bootstrap and --bootstrap-system (these were chosen to encourage user installs). It would be ideal if pip could support those flags, as the pip3 command currently must remove them before invoking pip main.
Once we're happy with the shape of pip3 we can fork it to Python 2 and use it as the canonical bootstrap script for installing pip and setuptools. I think we should also consider installing virtualenv in Python 2...
Happy to clarify where needed and code review is welcome. It's been a looong four days here :-)
Richard