On Sat, Dec 10, 2016 at 8:10 AM, Nick Coghlan <ncogh...@gmail.com> wrote:
> 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).
>

If setuptools setup.py had something along the lines of a
"--sys-install" switch that would force the installation to /usr
rather than /usr/local, I could see us easily adapting our macros to
just do that all the time. It might even be something that the Debian
guys would switch to, as the main concern they have is ensuring that
collisions don't occur. Then if without this switch, pip and other
things would default to installing to /usr/local when do you do sudo
pip install, I could see this working fairly well.



-- 
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to