summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-10-21 23:02:07 (GMT)
committerÉric Araujo <merwok@netwok.org>2010-10-21 23:02:07 (GMT)
commit68fc9aa318788344d36e72a0347ce967d6156f09 (patch)
tree4485dd0c96ffc1c55569798d32d1f130f6dee4d1 /Lib/distutils
parentc08f5448448ebb8d0aca65eb612f8fb4d9f2d6c2 (diff)
downloadcpython-68fc9aa318788344d36e72a0347ce967d6156f09.zip
cpython-68fc9aa318788344d36e72a0347ce967d6156f09.tar.gz
cpython-68fc9aa318788344d36e72a0347ce967d6156f09.tar.bz2
Apply fix from r85784 on py3k too.
Fixes bug #10126 for Python 3.2 by using $RUNSHARED to find the directory to the shared library. test_distutils now passes when Python was built with --enable-shared (Barry didn’t have the error but I did).
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_build_ext.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 4351c0f..6858e5a 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -52,8 +52,12 @@ class BuildExtTestCase(TempdirManager,
# Extension() instance because that doesn't get plumbed through to the
# final compiler command.
if not sys.platform.startswith('win'):
- library_dir = sysconfig.get_config_var('srcdir')
- cmd.library_dirs = [('.' if library_dir is None else library_dir)]
+ runshared = sysconfig.get_config_var('RUNSHARED')
+ if runshared is None:
+ cmd.library_dirs = ['.']
+ else:
+ name, equals, value = runshared.partition('=')
+ cmd.library_dirs = value.split(os.pathsep)
def test_build_ext(self):
global ALREADY_TESTED