Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 643238e

Browse files
committed
Issue #4366: Fix building extensions on all platforms when --enable-shared is used.
1 parent 3103631 commit 643238e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/distutils/command/build_ext.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@ def finalize_options(self):
247247
# building python standard extensions
248248
self.library_dirs.append('.')
249249

250-
# for extensions under Linux or Solaris with a shared Python library,
250+
# For building extensions with a shared Python library,
251251
# Python's library directory must be appended to library_dirs
252-
sysconfig.get_config_var('Py_ENABLE_SHARED')
253-
if (sys.platform.startswith(('linux', 'gnu', 'sunos'))
254-
and sysconfig.get_config_var('Py_ENABLE_SHARED')):
252+
# See Issues: #1600860, #4366
253+
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
255254
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
256255
# building third party extensions
257256
self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ Core and Builtins
7171
Library
7272
-------
7373

74+
- Issue #4366: Fix building extensions on all platforms when --enable-shared
75+
is used.
76+
7477
- Issue #18950: Fix miscellaneous bugs in the sunau module.
7578
Au_read.readframes() now updates current file position and reads correct
7679
number of frames from multichannel stream. Au_write.writeframesraw() now

0 commit comments

Comments
 (0)