diff options
author | LumÃr 'Frenzy' Balhar <frenzy.madness@gmail.com> | 2021-04-14 15:12:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 15:12:34 (GMT) |
commit | 341e8a939aca6e9f59ffb0e6daee5888933694ed (patch) | |
tree | 1a4e71db6e24ea4ef1fc9a266915811e555121d9 /Misc | |
parent | def919342facf7f53a3a5f0e9f4b1889d323956d (diff) | |
download | cpython-341e8a939aca6e9f59ffb0e6daee5888933694ed.zip cpython-341e8a939aca6e9f59ffb0e6daee5888933694ed.tar.gz cpython-341e8a939aca6e9f59ffb0e6daee5888933694ed.tar.bz2 |
bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549)
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
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst b/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst new file mode 100644 index 0000000..eefebcf --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst @@ -0,0 +1,2 @@ +Install schemes in :mod:`distutils.command.install` are now loaded from +:mod:`sysconfig`. |