]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #4366: Fix building extensions on all platforms when --enable-shared is used.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 28 Sep 2013 23:48:40 +0000 (01:48 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 28 Sep 2013 23:48:40 +0000 (01:48 +0200)
Lib/distutils/command/build_ext.py
Misc/NEWS

index 1ad0d5ff58d4f8c69d53c6eee2eb46c984b1a077..bc6a23f1b609b704b4e79ed34489bf9d907c71e6 100644 (file)
@@ -247,11 +247,10 @@ class build_ext(Command):
                 # building python standard extensions
                 self.library_dirs.append('.')
 
-        # for extensions under Linux or Solaris with a shared Python library,
+        # For building extensions with a shared Python library,
         # Python's library directory must be appended to library_dirs
-        sysconfig.get_config_var('Py_ENABLE_SHARED')
-        if (sys.platform.startswith(('linux', 'gnu', 'sunos'))
-            and sysconfig.get_config_var('Py_ENABLE_SHARED')):
+        # See Issues: #1600860, #4366
+        if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
             if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
                 # building third party extensions
                 self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
index 86a8e35bb450e5436dcc2a5622a954918e5bb97c..263712c93a76e9423b9c7ace5eb58a87cd355cf2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -71,6 +71,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #4366: Fix building extensions on all platforms when --enable-shared
+  is used.
+
 - Issue #18950: Fix miscellaneous bugs in the sunau module.
   Au_read.readframes() now updates current file position and reads correct
   number of frames from multichannel stream.  Au_write.writeframesraw() now