Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61c4e10

Browse files
committed
Issue #13901: Prevent test_packaging failures on OS X with --enable-shared.
1 parent f9b0255 commit 61c4e10

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Lib/packaging/tests/support.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ def fixup_build_ext(cmd):
366366
cmd = build_ext(dist)
367367
support.fixup_build_ext(cmd)
368368
cmd.ensure_finalized()
369+
370+
Unlike most other Unix platforms, Mac OS X embeds absolute paths
371+
to shared libraries into executables, so the fixup is not needed there.
369372
"""
370373
if os.name == 'nt':
371374
cmd.debug = sys.executable.endswith('_d.exe')
@@ -377,9 +380,11 @@ def fixup_build_ext(cmd):
377380
if runshared is None:
378381
cmd.library_dirs = ['.']
379382
else:
380-
name, equals, value = runshared.partition('=')
381-
cmd.library_dirs = value.split(os.pathsep)
382-
383+
if sys.platform == 'darwin':
384+
cmd.library_dirs = []
385+
else:
386+
name, equals, value = runshared.partition('=')
387+
cmd.library_dirs = value.split(os.pathsep)
383388

384389
try:
385390
from test.support import skip_unless_symlink

0 commit comments

Comments
 (0)