[Python-checkins] r85792 - python/branches/py3k/Lib/distutils/tests/test_build_ext.py

barry.warsaw python-checkins at python.org
Fri Oct 22 19:17:51 CEST 2010


Author: barry.warsaw
Date: Fri Oct 22 19:17:51 2010
New Revision: 85792

Log:
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.


Modified:
   python/branches/py3k/Lib/distutils/tests/test_build_ext.py

Modified: python/branches/py3k/Lib/distutils/tests/test_build_ext.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_build_ext.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_build_ext.py	Fri Oct 22 19:17:51 2010
@@ -51,7 +51,8 @@
         # 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 = ['.']


More information about the Python-checkins mailing list