diff options
author | ?ric Araujo <merwok@netwok.org> | 2012-02-05 11:42:49 +0100 |
---|---|---|
committer | ?ric Araujo <merwok@netwok.org> | 2012-02-05 11:42:49 +0100 |
commit | c54263c18f790b5229f1900b775b6c1322b53268 (patch) | |
tree | 794e87d8ae3bd95ecbf81aeac6fbb52e35cb0517 | |
parent | 789cac117c59198bd21685765847ad3122446d04 (diff) | |
download | disutils2-c54263c18f790b5229f1900b775b6c1322b53268.tar.gz |
Port OS X --enable-shared fix from packaging (#13901; untested)
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | distutils2/tests/support.py | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index fbd06c6..f12d25d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -160,6 +160,7 @@ CONTRIBUTORS.txt for full names. Bug numbers refer to http://bugs.python.org/. - Remove verbose arguments for Command and Compiler classes as well as util functions, obsoleted by logging [éric] - #12659: Add tests for tests.support [francisco] +- #13901: Prevent test failure on OS X for Python built in shared mode [ned] 1.0a3 - 2010-10-08 diff --git a/distutils2/tests/support.py b/distutils2/tests/support.py index 23c9ecb..b0f6cc8 100644 --- a/distutils2/tests/support.py +++ b/distutils2/tests/support.py @@ -357,7 +357,9 @@ def fixup_build_ext(cmd): When Python was built with --enable-shared on Unix, -L. is not enough to find libpython<blah>.so, because regrtest runs in a tempdir, not in the - source directory where the .so lives. + source directory where the .so lives. (Mac OS X embeds absolute paths + to shared libraries into executables, so the fixup is a no-op on that + platform.) When Python was built with in debug mode on Windows, build_ext commands need their debug attribute set, and it is not done automatically for @@ -379,9 +381,12 @@ def fixup_build_ext(cmd): if runshared is None: cmd.library_dirs = ['.'] else: - # FIXME no partition in 2.4 - name, equals, value = runshared.partition('=') - cmd.library_dirs = value.split(os.pathsep) + if sys.platform == 'darwin': + cmd.library_dirs = [] + else: + # FIXME no partition in 2.4 + name, equals, value = runshared.partition('=') + cmd.library_dirs = value.split(os.pathsep) try: |