mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fixed #5132: enable extensions to link on Solaris
This commit is contained in:
parent
38870cb432
commit
0d4fd3493e
3 changed files with 29 additions and 3 deletions
|
@ -231,10 +231,12 @@ class build_ext (Command):
|
|||
# building python standard extensions
|
||||
self.library_dirs.append('.')
|
||||
|
||||
# for extensions under Linux with a shared Python library,
|
||||
# for extensions under Linux or Solaris with a shared Python library,
|
||||
# Python's library directory must be appended to library_dirs
|
||||
if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \
|
||||
and sysconfig.get_config_var('Py_ENABLE_SHARED'):
|
||||
sysconfig.get_config_var('Py_ENABLE_SHARED')
|
||||
if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
|
||||
or sys.platform.startswith('sunos'))
|
||||
and 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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue