[3.10] bpo-41282: Fix broken `make install` (GH-26329) by miss-islington · Pull Request #26336 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 16 additions & 6 deletions Lib/distutils/command/install.py
12 changes: 12 additions & 0 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ def is_python_build(check_home=False):

_PYTHON_BUILD = is_python_build(True)

if _PYTHON_BUILD:
for scheme in ('posix_prefix', 'posix_home'):
# On POSIX-y platofrms, Python will:
# - Build from .h files in 'headers' (which is only added to the
# scheme when building CPython)
# - Install .h files to 'include'
scheme = _INSTALL_SCHEMES[scheme]
scheme['headers'] = scheme['include']
scheme['include'] = '{srcdir}/Include'
scheme['platinclude'] = '{projectbase}/.'


def _subst_vars(s, local_vars):
try:
return s.format(**local_vars)
Expand Down