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

mark.dickinson python-checkins at python.org
Tue Aug 3 23:33:04 CEST 2010


Author: mark.dickinson
Date: Tue Aug  3 23:33:04 2010
New Revision: 83689

Log:
Issue #8447: Make distutils.sysconfig follow symlinks in the path to
the interpreter executable.  This fixes a failure of test_httpservers
on OS X.



Modified:
   python/branches/release31-maint/Lib/distutils/sysconfig.py
   python/branches/release31-maint/Misc/NEWS

Modified: python/branches/release31-maint/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/release31-maint/Lib/distutils/sysconfig.py	(original)
+++ python/branches/release31-maint/Lib/distutils/sysconfig.py	Tue Aug  3 23:33:04 2010
@@ -25,7 +25,7 @@
 # Path to the base directory of the project. On Windows the binary may
 # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
 # it'll live in project/PCbuild/amd64.
-project_base = os.path.dirname(os.path.abspath(sys.executable))
+project_base = os.path.dirname(os.path.realpath(sys.executable))
 if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
     project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
 # PC/VS7.1
@@ -77,7 +77,7 @@
             # the build directory may not be the source directory, we
             # must use "srcdir" from the makefile to find the "Include"
             # directory.
-            base = os.path.dirname(os.path.abspath(sys.executable))
+            base = os.path.dirname(os.path.realpath(sys.executable))
             if plat_specific:
                 return base
             else:
@@ -223,7 +223,8 @@
 def get_makefile_filename():
     """Return full pathname of installed Makefile from the Python build."""
     if python_build:
-        return os.path.join(os.path.dirname(sys.executable), "Makefile")
+        return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
+                            "Makefile")
     lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
     return os.path.join(lib_dir, "config", "Makefile")
 
@@ -442,7 +443,7 @@
     g['SO'] = '.pyd'
     g['EXE'] = ".exe"
     g['VERSION'] = get_python_version().replace(".", "")
-    g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
+    g['BINDIR'] = os.path.dirname(os.path.realpath(sys.executable))
 
     global _config_vars
     _config_vars = g

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Tue Aug  3 23:33:04 2010
@@ -84,6 +84,10 @@
 Library
 -------
 
+- Issue #8447: Make distutils.sysconfig follow symlinks in the path to
+  the interpreter executable.  This fixes a failure of test_httpservers
+  on OS X.
+
 - Issue #7372: Fix pstats regression when stripping paths from profile
   data generated with the profile module.
 


More information about the Python-checkins mailing list