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

Marc-Andre Lemburg report at bugs.python.org
Wed May 5 17:30:34 EDT 2021


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Steve: I think the point of discussing whether "pip install" can
be used to manage system wide packages is moot. It's been like that
for ages, not only for pip, but also for the distutils setup.py install
process and the old Makefile.pre.in approach before that. People
have their reasons, it's what you'd expect to work as a Unix sysadmin
and won't go away anytime soon :-)

So back to the original point...

Filipe: Could you please explain why patching sysconfig.py is not a
long term solution ?

This doesn't involve any changes on the CPython side, is as flexible
as you can get (you can also patch functions defined in sysconfig.py
to do the necessary magic, not only provide a static dict),
doesn't create overhead for Python's startup, works with all the
different command line options for limiting sys.path additions and
avoids security issues with the Python import logic.

It's already clear that sysconfig.py will be the new golden source
for installation related APIs and schemes (perhaps this could be
made even clearer in the docs), so 3rd party packages will adapt
to this once 3.10 is out.

----------

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


More information about the Python-bugs-list mailing list