]> granicus.if.org Git - python/commitdiff
Only hack cmd.library_dirs when running under Py_ENABLE_SHARED. Tested both
authorBarry Warsaw <barry@python.org>
Fri, 22 Oct 2010 17:17:51 +0000 (17:17 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 22 Oct 2010 17:17:51 +0000 (17:17 +0000)
with and without --enable-shared on Ubuntu 10.10.  Hopefully this finally
solves bug 10126.  Will check 3.1 next.

Lib/distutils/tests/test_build_ext.py

index 6858e5a4b2d893eec120843c50a158de94f5853d..18e0011743031dceb128311c80952608f599d213 100644 (file)
@@ -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 = ['.']