On 10 December 2016 at 03:09, Orion Poplawski <or...@cora.nwra.com> wrote: > Debian deals with this by having dist-packages > (https://wiki.debian.org/Python). Is this not worth adopting?
This would be my main question as well, as tinkering with sys.prefix can have a host of unintended side effects. As far as I can see, the two main relevant pieces of the Debian solution are to: 1. Patch `site.getsitepackages()` to put a `/usr/local` path first: >>> import site >>> site.getsitepackages() ['/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.4/dist-packages', '/usr/lib/dist-python'] 2. Patch the system level installation tools to support `--install-layout=deb`. We can ignore the site-packages -> dist-packages rename (as we're not worried about the "custom builds might pick up system packages on sys.path" concern that addresses), but the other two aspects should be something Fedora can adapt (although the exact spelling of the "I am building a Fedora system package" aspect may be quite different). I do like the notion that `system-python` won't see any additions made to `/usr/local`, just as it won't see any `--user` level installations. The other point I'd also raise is that yes, the *initial implementation* of "/usr/bin/system-python" will share sys.path with "/usr/bin/python3", and hence transparently pick up the full standard library if the latter is installed. However, given the work going on with Fedora modularity, I don't think we want to assume that that's necessarily *always* going to be the case - for example, we may some day be able to make "/usr/bin/python" and "/usr/bin/python3" end-user configurable (so sysadmins can choose their own "default Python") without risking any harm to core system utilities written in Python. Cheers, Nick. P.S. For folks wondering what the problem with "--user" is on Debian/Ubuntu, as far as I know it's mainly the fact that "~/.local/bin" isn't on PATH by default, so scripts installed via "--user" aren't automatically available. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ python-devel mailing list -- python-devel@lists.fedoraproject.org To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org