diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index a2190c0214f..4e6058d0ec0 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) diff --git a/Misc/NEWS b/Misc/NEWS index d7eb5d92ff0..36b4f0a7142 100644 --- 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.