[Python-checkins] r81999 - in python/branches/py3k/Lib: distutils/command/install.py sysconfig.py

ronald.oussoren python-checkins at python.org
Tue Jun 15 18:05:20 CEST 2010


Author: ronald.oussoren
Date: Tue Jun 15 18:05:20 2010
New Revision: 81999

Log:
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).


Modified:
   python/branches/py3k/Lib/distutils/command/install.py
   python/branches/py3k/Lib/sysconfig.py

Modified: python/branches/py3k/Lib/distutils/command/install.py
==============================================================================
--- python/branches/py3k/Lib/distutils/command/install.py	(original)
+++ python/branches/py3k/Lib/distutils/command/install.py	Tue Jun 15 18:05:20 2010
@@ -302,8 +302,8 @@
         # 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 @@
                             'sys_exec_prefix': exec_prefix,
                             'exec_prefix': exec_prefix,
                             'srcdir': srcdir,
+                            'projectbase': projectbase,
                            }
 
         self.config_vars['userbase'] = self.install_userbase

Modified: python/branches/py3k/Lib/sysconfig.py
==============================================================================
--- python/branches/py3k/Lib/sysconfig.py	(original)
+++ python/branches/py3k/Lib/sysconfig.py	Tue Jun 15 18:05:20 2010
@@ -123,8 +123,8 @@
 
 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:


More information about the Python-checkins mailing list