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).
This commit is contained in:
Ronald Oussoren 2010-06-15 16:05:20 +00:00
parent cb532f13e3
commit e41a19e71a
2 changed files with 5 additions and 4 deletions

View File

@ -302,8 +302,8 @@ class install(Command):
# about needing recursive variable expansion (shudder). # about needing recursive variable expansion (shudder).
py_version = sys.version.split()[0] py_version = sys.version.split()[0]
prefix, exec_prefix, srcdir = get_config_vars('prefix', 'exec_prefix', prefix, exec_prefix, srcdir, projectbase = get_config_vars('prefix', 'exec_prefix',
'srcdir') 'srcdir', 'projectbase')
self.config_vars = {'dist_name': self.distribution.get_name(), self.config_vars = {'dist_name': self.distribution.get_name(),
'dist_version': self.distribution.get_version(), 'dist_version': self.distribution.get_version(),
@ -316,6 +316,7 @@ class install(Command):
'sys_exec_prefix': exec_prefix, 'sys_exec_prefix': exec_prefix,
'exec_prefix': exec_prefix, 'exec_prefix': exec_prefix,
'srcdir': srcdir, 'srcdir': srcdir,
'projectbase': projectbase,
} }
self.config_vars['userbase'] = self.install_userbase self.config_vars['userbase'] = self.install_userbase

View File

@ -123,8 +123,8 @@ _PYTHON_BUILD = is_python_build()
if _PYTHON_BUILD: if _PYTHON_BUILD:
for scheme in ('posix_prefix', 'posix_home'): for scheme in ('posix_prefix', 'posix_home'):
_INSTALL_SCHEMES[scheme]['include'] = '{projectbase}/Include' _INSTALL_SCHEMES[scheme]['include'] = '{srcdir}/Include'
_INSTALL_SCHEMES[scheme]['platinclude'] = '{srcdir}' _INSTALL_SCHEMES[scheme]['platinclude'] = '{projectbase}/.'
def _subst_vars(s, local_vars): def _subst_vars(s, local_vars):
try: try: