summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/support.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2012-02-03 01:39:49 (GMT)
committerNed Deily <nad@acm.org>2012-02-03 01:39:49 (GMT)
commitfbc56fde26b3b59f89cbb18d32154f084f615253 (patch)
tree3404107af419a3f7f0940115fb5aaf978ea484e9 /Lib/distutils/tests/support.py
parent6dce7d633fdb33f0241cf7105b7b84537c9069a8 (diff)
downloadcpython-fbc56fde26b3b59f89cbb18d32154f084f615253.zip
cpython-fbc56fde26b3b59f89cbb18d32154f084f615253.tar.gz
cpython-fbc56fde26b3b59f89cbb18d32154f084f615253.tar.bz2
Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
Diffstat (limited to 'Lib/distutils/tests/support.py')
-rw-r--r--Lib/distutils/tests/support.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
index a2190c0..4e6058d 100644
--- a/Lib/distutils/tests/support.py
+++ b/Lib/distutils/tests/support.py
@@ -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)