The high-level goal in Fedora that I thought this PEP will help me achieve is:
-
local means
/usr/local/lib.../python.../site-packages
-
system means
/usr/lib.../python.../site-packages
sudo pip install
will install to local
This is already the case in Fedora due to our patch to sysconfig.
sudo pip install --upgrade
will install to local and only uninstall from there, never uninstall from system
This is already the case in Fedora due to our patches to sysconfig and pip.
Users who pip install --upgrade pip
unfortunately lose this protection because they undo our pip patch [1].
sudo pip install --prefix=/usr
will error with the message from EXTERNALLY-MANAGED
This is not the case for Fedora yet.
sudo pip install --prefix=/usr --break-my-system
will let users install to system
This is currently moot for Fedora, due to the previous point.
Maybe I simply had bad expectations about this PEP. Sorry for not making this clearer before it was approved. I tried to stay on top of this and then I missed the train when it suddenly got moving.
-
I’ve just noticed the
KeyError
comment in the patch is bogus, feel free to ignore it. ↩︎