[Python-checkins] cpython: Closes #15366: Corrected computation of include location for source builds.

vinay.sajip python-checkins at python.org
Mon Jul 16 19:25:08 CEST 2012


http://hg.python.org/cpython/rev/998c8a8f2aea
changeset:   78135:998c8a8f2aea
user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
date:        Mon Jul 16 18:24:55 2012 +0100
summary:
  Closes #15366: Corrected computation of include location for source builds. Thanks to Richard Oudkerk for the bug report and patch.

files:
  Lib/distutils/sysconfig.py |  7 ++++---
  1 files changed, 4 insertions(+), 3 deletions(-)


diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -101,10 +101,11 @@
             base = _sys_home or os.path.dirname(os.path.abspath(sys.executable))
             if plat_specific:
                 return base
+            if _sys_home:
+                incdir = os.path.join(_sys_home, get_config_var('AST_H_DIR'))
             else:
-                incdir = os.path.join(_sys_home or get_config_var('srcdir'),
-                                      'Include')
-                return os.path.normpath(incdir)
+                incdir = os.path.join(get_config_var('srcdir'), 'Include')
+            return os.path.normpath(incdir)
         python_dir = 'python' + get_python_version() + build_flags
         return os.path.join(prefix, "include", python_dir)
     elif os.name == "nt":

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list