summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2010-10-22 17:17:51 (GMT)
committerBarry Warsaw <barry@python.org>2010-10-22 17:17:51 (GMT)
commit4ebfdf01bb128005842be322fc89457d527ff000 (patch)
treefdd66b085dc1768e51468fad21fde0f88647ea31
parent9a8439d3e96fc4779d40628b2d286824de43aa89 (diff)
downloadcpython-4ebfdf01bb128005842be322fc89457d527ff000.zip
cpython-4ebfdf01bb128005842be322fc89457d527ff000.tar.gz
cpython-4ebfdf01bb128005842be322fc89457d527ff000.tar.bz2
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 next.
-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 6858e5a..18e0011 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -51,7 +51,8 @@ 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'):
+ 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 = ['.']