]> 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:39:49 +0000 (02:39 +0100)
committerNed Deily <nad@acm.org>
Fri, 3 Feb 2012 01:39:49 +0000 (02:39 +0100)
Lib/distutils/tests/support.py
Misc/NEWS

index a2190c0214fd318bc7d2494dd28b3c7195094490..4e6058d0ec0e67468dcd2e07350114fafec07f97 100644 (file)
@@ -200,6 +200,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')
@@ -211,5 +214,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 d7eb5d92ff06d0078e68af34c1a4404e01230201..36b4f0a71420f6f6634693c072ef35db64509251 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -90,6 +90,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.