Skip to content
Closed
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
3 changes: 3 additions & 0 deletions Lib/distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ def finalize_options(self):
self.config_vars['userbase'] = self.install_userbase
self.config_vars['usersite'] = self.install_usersite

if sysconfig.is_python_build(True):
self.config_vars['srcdir'] = sysconfig.get_config_var('srcdir')

self.expand_basedirs()

self.dump_dirs("post-expand_basedirs()")
Expand Down
6 changes: 6 additions & 0 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ def is_python_build(check_home=False):

_PYTHON_BUILD = is_python_build(True)

if _PYTHON_BUILD:
for scheme in ('posix_prefix', 'posix_home'):
_INSTALL_SCHEMES[scheme]['include'] = '{srcdir}/Include'
_INSTALL_SCHEMES[scheme]['platinclude'] = '{projectbase}/.'


def _subst_vars(s, local_vars):
try:
return s.format(**local_vars)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix broken ``make install`` that caused standard library extension modules
to be unnecessarily and incorrectly rebuilt during the install phase of
cpython.