[Python-checkins] r80650 - in python/branches/release26-maint: Lib/distutils/sysconfig.py Misc/NEWS

tarek.ziade python-checkins at python.org
Fri Apr 30 14:18:51 CEST 2010


Author: tarek.ziade
Date: Fri Apr 30 14:18:51 2010
New Revision: 80650

Log:
Merged revisions 80649 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80649 | tarek.ziade | 2010-04-30 14:15:12 +0200 (Fri, 30 Apr 2010) | 1 line
  
  Fixed #8577. distutils.sysconfig.get_python_inc() now differenciates buildir and srcdir
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/distutils/sysconfig.py
   python/branches/release26-maint/Misc/NEWS

Modified: python/branches/release26-maint/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/release26-maint/Lib/distutils/sysconfig.py	(original)
+++ python/branches/release26-maint/Lib/distutils/sysconfig.py	Fri Apr 30 14:18:51 2010
@@ -71,15 +71,19 @@
     """
     if prefix is None:
         prefix = plat_specific and EXEC_PREFIX or PREFIX
+
     if os.name == "posix":
         if python_build:
-            base = os.path.dirname(os.path.abspath(sys.executable))
+            buildir = os.path.dirname(sys.executable)
             if plat_specific:
-                inc_dir = base
+                # python.h is located in the buildir
+                inc_dir = buildir
             else:
-                inc_dir = os.path.join(base, "Include")
-                if not os.path.exists(inc_dir):
-                    inc_dir = os.path.join(os.path.dirname(base), "Include")
+                # the source dir is relative to the buildir
+                srcdir = os.path.abspath(os.path.join(buildir,
+                                         get_config_var('srcdir')))
+                # Include is located in the srcdir
+                inc_dir = os.path.join(srcdir, "Include")
             return inc_dir
         return os.path.join(prefix, "include", "python" + get_python_version())
     elif os.name == "nt":

Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS	(original)
+++ python/branches/release26-maint/Misc/NEWS	Fri Apr 30 14:18:51 2010
@@ -33,6 +33,10 @@
 Library
 -------
 
+- Issue #8577: distutils.sysconfig.get_python_inc() now makes a difference 
+  between the build dir and the source dir when looking for "python.h" or
+  "Include".
+
 - Issue #8464: tarfile no longer creates files with execute permissions set
   when mode="w|" is used.
 


More information about the Python-checkins mailing list