]> granicus.if.org Git - python/commitdiff
Apply fix from r85784 on py3k too.
authorÉric Araujo <merwok@netwok.org>
Thu, 21 Oct 2010 23:02:07 +0000 (23:02 +0000)
committerÉric Araujo <merwok@netwok.org>
Thu, 21 Oct 2010 23:02:07 +0000 (23:02 +0000)
Fixes bug #10126 for Python 3.2 by using $RUNSHARED to find the
directory to the shared library.  test_distutils now passes when
Python was built with --enable-shared (Barry didn’t have the error
but I did).

Lib/distutils/tests/test_build_ext.py

index 4351c0f8d5923eb71eae925839e2052f0c8af47e..6858e5a4b2d893eec120843c50a158de94f5853d 100644 (file)
@@ -52,8 +52,12 @@ class BuildExtTestCase(TempdirManager,
         # 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)]
+            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