[issue43976] Allow Python distributors to add custom site install schemes

Miro Hrončok report at bugs.python.org
Tue Jan 4 08:50:11 EST 2022


Miro Hrončok <miro at hroncok.cz> added the comment:

In Fedora 36+ / Python 3.10+ we now use an install_scheme that looks like this:

    'purelib': '{base}/local/lib/python{py_version_short}/site-packages',
    'platlib': '{platbase}/local/{platlibdir}/python{py_version_short}/site-packages',
    'scripts': '{base}/local/bin',
    'data': '{base}/local',
    ...

We got a user report [1] saying that `pip install --root ... --prefix /usr` the prefix is not respected at all.

That is, users expect that /usr/local is the prefix, and when they explicitly set it to /usr, the /local/ bit will not be there, while in reality, /local/ is not a part of the prefix, but it is a part of the installation scheme.

I can somehow relate to that assumption.

Now I wonder whether we should have adapted prefix instead of the installation scheme :/


Any ideas on how to approach this problem? I am quite clueless.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=2026979

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43976>
_______________________________________


More information about the Python-bugs-list mailing list