summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-22 18:34:13 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-22 18:34:13 (GMT)
commitecdd08462af25573af316e63fdbb1b5e7c6c524a (patch)
tree05e15823de7463ce0d2a76f8154e3f3cb1f37fca /Lib/distutils
parent8ad8039636e7974c8a1dead451323e24c0b2c2c5 (diff)
downloadcpython-ecdd08462af25573af316e63fdbb1b5e7c6c524a.zip
cpython-ecdd08462af25573af316e63fdbb1b5e7c6c524a.tar.gz
cpython-ecdd08462af25573af316e63fdbb1b5e7c6c524a.tar.bz2
Should fix remaining 3.1 buildbot failure
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_build_ext.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 04ebc5b..226f7bb 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -52,9 +52,14 @@ class BuildExtTestCase(TempdirManager,
# To further add to the fun, we can't just add library_dirs to the
# 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)]
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED') and
+ not sys.platform.startswith('win')):
+ 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
@@ -317,6 +322,7 @@ class BuildExtTestCase(TempdirManager,
dist = Distribution({'name': 'xx',
'ext_modules': [ext]})
cmd = build_ext(dist)
+ self._fixup_command(cmd)
cmd.ensure_finalized()
self.assertEquals(len(cmd.get_outputs()), 1)