1 --- Python-2.7.6/setup.py.~1~ 2013-11-10 11:36:41.000000000 +0400
2 +++ Python-2.7.6/setup.py 2014-06-04 10:11:58.356029565 +0400
5 def detect_modules(self):
6 # Ensure that /usr/local is always used
7 - if not cross_compiling:
8 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
9 - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
10 + # if not cross_compiling:
11 + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
12 + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
15 self.add_multiarch_paths()
19 readline_libs.append('termcap')
21 + if host_platform == 'sunos5':
22 + # insert '-zrecord' before the readline libraries that we
23 + # want to link with to avoid rl_insert() elimination
24 + readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
27 exts.append( Extension('readline', ['readline.c'],
28 library_dirs=['/usr/lib/termcap'],
29 extra_link_args=readline_extra_link_args,
31 exts.append( Extension('_csv', ['_csv.c']) )
34 + socket_libs = math_libs + [ 'socket', 'nsl' ]
35 exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
36 depends=['socketmodule.h'],
37 - libraries=math_libs) )
38 + libraries=socket_libs) )
39 # Detect SSL support for the socket module (via _ssl)
40 search_for_ssl_incs_in = [
41 '/usr/local/ssl/include',
42 @@ -1579,9 +1587,14 @@
43 sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
44 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
47 + if host_platform == 'sunos5':
48 + multiproc_libs = [ "xnet" ]
50 if sysconfig.get_config_var('WITH_THREAD'):
51 exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
52 define_macros=macros.items(),
53 + libraries=multiproc_libs,
54 include_dirs=["Modules/_multiprocessing"]))
56 missing.append('_multiprocessing')
58 # this option. If you want to compile ctypes with the Sun
59 # compiler, please research a proper solution, instead of
60 # finding some -z option for the Sun compiler.
61 - extra_link_args.append('-mimpure-text')
62 + #extra_link_args.append('-mimpure-text')
65 elif host_platform.startswith('hp-ux'):
66 extra_link_args.append('-fPIC')