mirror of https://github.com/python/cpython
341e8a939a
With this patch, `distutils.command.install.INSTALL_SCHEMES` are loaded from `sysconfig._INSTALL_SCHEMES`. The distutils module is deprecated and will be removed in 3.12 (PEP 632). This change makes the `sysconfig._INSTALL_SCHEMES` the single point of truth for install schemes while keeping `distutils.command.install.INSTALL_SCHEMES` exactly the same. If we, during the transition to the sysconfig, change something, this makes sure that it also propagates to distutils until the module gets removed. Moreover, as discussed [on Discourse], Linux distros need to patch distutils/sysconfig to make sure the packages will land in proper locations. This patch makes it easier because it leaves only one location where install schemes are defined which is much easier to patch/adjust. [on Discourse]: https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134 The implementation is slightly different than the plan but I think it's the easiest way how to do it and it also makes the downstream patch simple, flexible and easy to maintain. It's also necessary to implement this before setuptools starts bundling the distutils module so the default install schemes stay in the standard library. The removed code from sysconfig does not seem to have any negative effect because, honestly, it seems that nothing actually uses the install schemes from sysconfig at all. There were many big changes in these modules where they were trying to include packaging in stdlib and then reverted that. Also, the test of distutils install command does not count with the different locations which is good evidence that the reason to have this piece of code is no longer valid. https://bugs.python.org/issue41282 |
||
---|---|---|
.. | ||
__init__.py | ||
bdist.py | ||
bdist_dumb.py | ||
bdist_msi.py | ||
bdist_rpm.py | ||
build.py | ||
build_clib.py | ||
build_ext.py | ||
build_py.py | ||
build_scripts.py | ||
check.py | ||
clean.py | ||
command_template | ||
config.py | ||
install.py | ||
install_data.py | ||
install_egg_info.py | ||
install_headers.py | ||
install_lib.py | ||
install_scripts.py | ||
register.py | ||
sdist.py | ||
upload.py |