Fixed #5132: enable extensions to link on Solaris

This commit is contained in:
Tarek Ziadé 2009-02-05 22:52:52 +00:00
parent 38870cb432
commit 0d4fd3493e
3 changed files with 29 additions and 3 deletions

View file

@ -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'))