On 15 June 2013 16:02, Marcus Smith <qwcode@gmail.com> wrote:
1. We should write the bootstrapped pip to the same location that we're installing the package to (so system global, user local or current venv).
this makes sense for global and user installs, but not venv? when you're in a venv, you're using the pip installed in that specific venv, not the bootstrap.
True for virtualenv, but not for pyvenv - that doesn't install anything into the virtual environment, it just creates it. I expect the 3.4 version will add a link to the appropriate bootstrapping script though, so we need to define the expected behaviour in that case.
and just to confirm about user install bootstrapping, it would work like this? - user1 happens to run "pip3 install --user django" as his first pip3 command - the bootstrap installs pip to /home/user1/.local - thereafter, user1's executions of pip3 detects the importable pip in user local, and does no more bootstrapping - user2 runs "pip3 install --user django" as his first pip3 command - the bootstrap installs pip to /home/user2/.local ...
and if instead user1 ran "sudo pip install django" as his first command, pip get's installed globally. and thereafter, all users would be using a global installed pip, no matter what they're first command was.
That is what I was saying, but with it spelled out like that, I don't like it. The destination of the current install request isn't adequate justification for defining the location of the installed pip. Instead, I'm starting to think that with the right error message, "Explicit is better than implicit" and "In the face of ambiguity, refuse the temptation to guess" should rule the day here. For example: $pip3 install Django pip is not currently installed. Run 'pip3 bootstrap' or 'pip3 bootstrap --system' to install it. $pip3 bootstrap --help Usage: pip3 bootstrap pip3 bootstrap --system Description: Downloads and installs the latest version of pip from the Python Package Index (pypi.python.org). Installs into the active virtual environment (if any) or the current user's site-packages directory. Has no effect if pip is already installed (run "pip install --upgrade pip" to upgrade to a later version). Options: --system Install into the system site-packages instead of the venv or user site-packages. --wheel <file> Installs from the given wheel file instead of downloading from PyPI Linux distros could then patch the 'pip3 bootstrap --system' variant to invoke the appropriate platform specific installation command. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia