8000 bpo-41282: (PEP 632) Load install schemes from sysconfig by frenzymadness · Pull Request #24549 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41282: (PEP 632) Load install schemes from sysconfig #24549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Petr Viktorin <encukou@gmail.com>
  • Loading branch information
frenzymadness and encukou authored Apr 14, 2021
commit 8f779468f7f666ae742eb084d7e385f16f2ee482
14 changes: 7 additions & 7 deletions Lib/distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
HAS_USER_SITE = (USER_SITE is not None)

# The keys to an installation scheme; if any new types of files are to be
# installed, be sure to add an entry to every installation scheme above,
# and to SCHEME_KEYS here.
# installed, be sure to add an entry to every scheme in
# sysconfig._INSTALL_SCHEMES, and to SCHEME_KEYS here.
SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data')

# The following code provides backward-compatible INSTALL_SCHEMES
# while making the sysconfig module the single point of truth.
# This makes it easier for OS distributions where they need to
# alter locations for packages installations on single place.
# This module is depracated anyway (PEP 632) so if anything
# doesn't work for you, take a look at sysconfig.
# alter locations for packages installations in a single place.
# Note that this module is depracated (PEP 632); all consumers
# of this information should switch to using sysconfig directly.
INSTALL_SCHEMES = {"unix_prefix": {}, "unix_home": {}, "nt": {}}

# Copy from sysconfig._INSTALL_SCHEMES
Expand All @@ -58,8 +58,8 @@
value = value.replace("/lib/", "/$platlibdir/")
INSTALL_SCHEMES[main_key][key] = value

# The following part of INSTALL_SCHEMES has different definition
# that the one in sysconfig but because both depends on site module
# The following part of INSTALL_SCHEMES has a different definition
# than the one in sysconfig, but because both depend on the site module,
# the outcomes should be the same.
if HAS_USER_SITE:
INSTALL_SCHEMES['nt_user'] = {
Expand Down
0