From e41a19e71ad5ffa2968916f1d81e3323a4f71542 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 15 Jun 2010 16:05:20 +0000 Subject: Fix for issue #8577: without this patch test_distutils will fail when builddir != srcdir (that is, when you run configure in a directory that is not the top of the source tree). --- Lib/distutils/command/install.py | 5 +++-- Lib/sysconfig.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 3c28c66..e3e387a 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -302,8 +302,8 @@ class install(Command): # about needing recursive variable expansion (shudder). py_version = sys.version.split()[0] - prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', - 'srcdir') + prefix, exec_prefix, srcdir, projectbase = get_config_vars('prefix', 'exec_prefix', + 'srcdir', 'projectbase') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), @@ -316,6 +316,7 @@ class install(Command): 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, 'srcdir': srcdir, + 'projectbase': projectbase, } self.config_vars['userbase'] = self.install_userbase diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 731aed3..91298d1 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -123,8 +123,8 @@ _PYTHON_BUILD = is_python_build() if _PYTHON_BUILD: for scheme in ('posix_prefix', 'posix_home'): - _INSTALL_SCHEMES[scheme]['include'] = '{projectbase}/Include' - _INSTALL_SCHEMES[scheme]['platinclude'] = '{srcdir}' + _INSTALL_SCHEMES[scheme]['include'] = '{srcdir}/Include' + _INSTALL_SCHEMES[scheme]['platinclude'] = '{projectbase}/.' def _subst_vars(s, local_vars): try: -- cgit v0.12