Issue #13901: Prevent test_packaging failures on OS X with --enable-shared.

This commit is contained in:
Ned Deily 2012-02-03 02:46:37 +01:00
parent f9b0255db3
commit 61c4e10035
1 changed files with 8 additions and 3 deletions

View File

@ -366,6 +366,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')
@ -376,11 +379,13 @@ def fixup_build_ext(cmd):
runshared = sysconfig.get_config_var('RUNSHARED')
if runshared is None:
cmd.library_dirs = ['.']
else:
if sys.platform == 'darwin':
cmd.library_dirs = []
else:
name, equals, value = runshared.partition('=')
cmd.library_dirs = value.split(os.pathsep)
try:
from test.support import skip_unless_symlink
except ImportError: