Skip to content

Commit

Permalink
Prefer public APIs for sysconfig schemes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Nov 6, 2021
1 parent 044f771 commit 1d7c748
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def _load_schemes():

try:
import sysconfig
schemes.update(sysconfig.INSTALL_SCHEMES)
sysconfig_schemes = {
scheme: sysconfig.get_paths(scheme, expand=False)
for scheme in sysconfig.get_scheme_names()
}
schemes.update(sysconfig_schemes)
except (ImportError, AttributeError):
pass

Expand Down

0 comments on commit 1d7c748

Please sign in to comment.