PSARC 2014/183 Python 2.7.6
18251953 update Python 2.7 line to version 2.7.6
19004605 update Python 2.7 line to version 2.7.7
19308541 update Python 2.7 line to version 2.7.8
19284990 python 2.7.7 segfaults while under memory stress
17431625 64-bit python should use long rather than int for os.sysconf() return value
19164544 Python 2.7 test_tcl fails
19030238 Python 2.7 test_sysconfig fails - no module named _osx_support
19030198 Python 2.7 tests fail - import name error
19032456 more Python 2.7 tests failing with import errors
19022543 Python 2.7 test_lib2to3 fails
This patch modifies the setup script to support Solaris.
As it is Solaris-specific, it is not suitable for upstream.
--- Python-2.7.8/setup.py.~1~ 2014-06-29 19:05:48.000000000 -0700
+++ Python-2.7.8/setup.py 2014-07-17 20:37:57.419011542 -0700
@@ -437,9 +437,9 @@
def detect_modules(self):
# Ensure that /usr/local is always used
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ # if not cross_compiling:
+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
if cross_compiling:
self.add_gcc_paths()
self.add_multiarch_paths()
@@ -763,6 +763,13 @@
['/usr/lib/termcap'],
'termcap'):
readline_libs.append('termcap')
+
+ if host_platform == 'sunos5':
+ # insert '-zrecord' before the readline libraries that we
+ # want to link with to avoid rl_insert() elimination
+ readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
+ readline_libs = ()
+
exts.append( Extension('readline', ['readline.c'],
library_dirs=['/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
@@ -784,7 +791,7 @@
# socket(2)
exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
depends=['socketmodule.h'],
- libraries=math_libs) )
+ libraries=math_libs + ['socket', 'nsl']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
'/usr/local/ssl/include',
@@ -1585,9 +1592,14 @@
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
+ multiproc_libs = []
+ if host_platform == 'sunos5':
+ multiproc_libs = [ "xnet" ]
+
if sysconfig.get_config_var('WITH_THREAD'):
exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
define_macros=macros.items(),
+ libraries=multiproc_libs,
include_dirs=["Modules/_multiprocessing"]))
else:
missing.append('_multiprocessing')
@@ -2081,7 +2088,8 @@
# this option. If you want to compile ctypes with the Sun
# compiler, please research a proper solution, instead of
# finding some -z option for the Sun compiler.
- extra_link_args.append('-mimpure-text')
+ #extra_link_args.append('-mimpure-text')
+ pass
elif host_platform.startswith('hp-ux'):
extra_link_args.append('-fPIC')