]> granicus.if.org Git - python/commitdiff
Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
authorNed Deily <nad@acm.org>
Fri, 3 Feb 2012 01:42:16 +0000 (02:42 +0100)
committerNed Deily <nad@acm.org>
Fri, 3 Feb 2012 01:42:16 +0000 (02:42 +0100)
Lib/distutils/tests/support.py
Misc/NEWS

index d77bbee362f4db9225c92ec7c9c5696e6bdef1aa..84d92323284f7a9685a16c673bda75b918382da1 100644 (file)
@@ -188,6 +188,9 @@ def fixup_build_ext(cmd):
         cmd = build_ext(dist)
         support.fixup_build_ext(cmd)
         cmd.ensure_finalized()
+
+    Unlike most other Unix platforms, Mac OS X embeds absolute paths
+    to shared libraries into executables, so the fixup is not needed there.
     """
     if os.name == 'nt':
         cmd.debug = sys.executable.endswith('_d.exe')
@@ -199,5 +202,8 @@ def fixup_build_ext(cmd):
         if runshared is None:
             cmd.library_dirs = ['.']
         else:
-            name, equals, value = runshared.partition('=')
-            cmd.library_dirs = value.split(os.pathsep)
+            if sys.platform == 'darwin':
+                cmd.library_dirs = []
+            else:
+                name, equals, value = runshared.partition('=')
+                cmd.library_dirs = value.split(os.pathsep)
index 0f0479c14f68a78841368dd00e5f468e06d0301a..136748e6cb729264875e7bc2b8103d00c88ca710 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -113,6 +113,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
+
 - Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
 
 - Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.