summaryrefslogtreecommitdiff
path: root/Lib/distutils
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2010-10-22 15:31:44 +0000
committerBarry Warsaw <barry@python.org>2010-10-22 15:31:44 +0000
commit421f132b83b5746fa0a38c3ff077776489ed9caa (patch)
treeba53e4bd8a6dfd46d30748032cd8060c904a1a17 /Lib/distutils
parentbcc3d37af6a4c1a5015b8789efb8eabba3e6d625 (diff)
downloadcpython-421f132b83b5746fa0a38c3ff077776489ed9caa.tar.gz
Only hack cmd.library_dirs when running under Py_ENABLE_SHARED. Tested both
with and without --enable-shared on Ubuntu 10.10. Hopefully this finally solves bug 10126. Will check 3.1 and py3k next.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_build_ext.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index e04593065d..d14c5f6b10 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -59,7 +59,8 @@ class BuildExtTestCase(support.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'):
+ 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 = ['.']