cpython/Lib/distutils
Lumír 'Frenzy' Balhar 341e8a939a
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
2021-04-14 17:12:34 +02:00
..
command bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549) 2021-04-14 17:12:34 +02:00
tests bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) 2021-01-31 22:29:44 -05:00
__init__.py bpo-41282: distutils: Fix stacklevel for DeprecationWarning (GH-24657) 2021-03-02 11:49:10 +09:00
_msvccompiler.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
archive_util.py bpo-22831: Use "with" to avoid possible fd leaks in distutils. (GH-10921) 2018-12-20 19:00:14 +02:00
bcppcompiler.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
ccompiler.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
cmd.py Issue #29218: Remove unused install_misc command 2017-02-01 04:42:48 +03:00
config.py bpo-32155: Revert distutils.config change (#4618) 2017-11-28 23:19:26 +01:00
core.py
cygwinccompiler.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
debug.py
dep_util.py
dir_util.py
dist.py bpo-19610: Warn if distutils is provided something other than a list to some fields (#4685) 2017-12-04 18:58:12 -08:00
errors.py
extension.py Removed unused imports. 2016-04-25 00:12:32 +03:00
fancy_getopt.py
file_util.py
filelist.py Issue #22493: Inline flags now should be used only at the start of the 2016-09-11 12:50:02 +03:00
log.py bpo-34421: Improve distutils logging for non-ASCII strings. (GH-9126) 2018-09-23 09:12:59 +03:00
msvc9compiler.py Revert "bpo-42405: fix C extensions build on Windows ARM64 (GH-23399)" (#24753) 2021-03-04 13:41:49 -05:00
msvccompiler.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
README Distutils no longer needs to remain compatible with 2.3 (GH-11423) 2019-01-10 10:55:03 +11:00
spawn.py bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) 2021-01-31 22:29:44 -05:00
sysconfig.py bpo-40443: Remove unused imports in distutils (GH-19802) 2020-04-30 11:28:09 +02:00
text_file.py Removed unused imports. 2016-04-25 00:12:32 +03:00
unixccompiler.py bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301) 2020-11-22 00:14:25 -05:00
util.py bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303) 2019-12-16 00:17:53 +10:00
version.py bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952) 2019-08-08 08:42:54 +03:00
versionpredicate.py #27364: fix "incorrect" uses of escape character in the stdlib. 2016-09-08 13:59:53 -04:00

This directory contains the Distutils package.

There's a full documentation available at:

    http://docs.python.org/distutils/

The Distutils-SIG web page is also a good starting point:

    http://www.python.org/sigs/distutils-sig/

$Id$