components/python/python27/patches/02-setup.patch
branchs11u2-sru
changeset 3611 e09fa6c4472b
parent 3379 e99da14b537a
child 3978 adf3ab1a234a
equal deleted inserted replaced
3610:70f156a82910 3611:e09fa6c4472b
     1 This patch modifies the setup script to support Solaris.
     1 This patch modifies the setup script to support Solaris.
     2 As it is Solaris-specific, it is not suitable for upstream.
     2 As it is Solaris-specific, it is not suitable for upstream.
     3 
     3 
     4 --- Python-2.7.8/setup.py.~1~	2014-06-29 19:05:48.000000000 -0700
     4 --- Python-2.7.9/setup.py.~1~	2014-12-10 08:00:01.000000000 -0800
     5 +++ Python-2.7.8/setup.py	2014-07-17 20:37:57.419011542 -0700
     5 +++ Python-2.7.9/setup.py	2014-12-17 11:39:50.963351605 -0800
     6 @@ -437,9 +437,9 @@
     6 @@ -439,9 +439,9 @@
     7  
     7  
     8      def detect_modules(self):
     8      def detect_modules(self):
     9          # Ensure that /usr/local is always used
     9          # Ensure that /usr/local is always used
    10 -        if not cross_compiling:
    10 -        if not cross_compiling:
    11 -            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
    11 -            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
    14 +        #   add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
    14 +        #   add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
    15 +        #   add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
    15 +        #   add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
    16          if cross_compiling:
    16          if cross_compiling:
    17              self.add_gcc_paths()
    17              self.add_gcc_paths()
    18          self.add_multiarch_paths()
    18          self.add_multiarch_paths()
    19 @@ -763,6 +763,13 @@
    19 @@ -765,6 +765,13 @@
    20                                                       ['/usr/lib/termcap'],
    20                                                       ['/usr/lib/termcap'],
    21                                                       'termcap'):
    21                                                       'termcap'):
    22                  readline_libs.append('termcap')
    22                  readline_libs.append('termcap')
    23 +
    23 +
    24 +	    if host_platform == 'sunos5':
    24 +	    if host_platform == 'sunos5':
    28 +		readline_libs = ()
    28 +		readline_libs = ()
    29 +
    29 +
    30              exts.append( Extension('readline', ['readline.c'],
    30              exts.append( Extension('readline', ['readline.c'],
    31                                     library_dirs=['/usr/lib/termcap'],
    31                                     library_dirs=['/usr/lib/termcap'],
    32                                     extra_link_args=readline_extra_link_args,
    32                                     extra_link_args=readline_extra_link_args,
    33 @@ -784,7 +791,7 @@
    33 @@ -786,7 +793,7 @@
    34          # socket(2)
    34          # socket(2)
    35          exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
    35          exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'],
    36                                 depends=['socketmodule.h'],
    36                                 depends=['socketmodule.h'],
    37 -                               libraries=math_libs) )
    37 -                               libraries=math_libs) )
    38 +                               libraries=math_libs + ['socket', 'nsl']) )
    38 +                               libraries=math_libs + ['socket', 'nsl']) )
    39          # Detect SSL support for the socket module (via _ssl)
    39          # Detect SSL support for the socket module (via _ssl)
    40          search_for_ssl_incs_in = [
    40          search_for_ssl_incs_in = [
    41                                '/usr/local/ssl/include',
    41                                '/usr/local/ssl/include',
    42 @@ -1585,9 +1592,14 @@
    42 @@ -1587,9 +1594,14 @@
    43                  sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
    43                  sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
    44                  multiprocessing_srcs.append('_multiprocessing/semaphore.c')
    44                  multiprocessing_srcs.append('_multiprocessing/semaphore.c')
    45  
    45  
    46 +	multiproc_libs = []
    46 +	multiproc_libs = []
    47 +	if host_platform == 'sunos5':
    47 +	if host_platform == 'sunos5':
    52                                      define_macros=macros.items(),
    52                                      define_macros=macros.items(),
    53 +                                    libraries=multiproc_libs,
    53 +                                    libraries=multiproc_libs,
    54                                      include_dirs=["Modules/_multiprocessing"]))
    54                                      include_dirs=["Modules/_multiprocessing"]))
    55          else:
    55          else:
    56              missing.append('_multiprocessing')
    56              missing.append('_multiprocessing')
    57 @@ -2081,7 +2088,8 @@
    57 @@ -2083,7 +2095,8 @@
    58              # this option. If you want to compile ctypes with the Sun
    58              # this option. If you want to compile ctypes with the Sun
    59              # compiler, please research a proper solution, instead of
    59              # compiler, please research a proper solution, instead of
    60              # finding some -z option for the Sun compiler.
    60              # finding some -z option for the Sun compiler.
    61 -            extra_link_args.append('-mimpure-text')
    61 -            extra_link_args.append('-mimpure-text')
    62 +            #extra_link_args.append('-mimpure-text')
    62 +            #extra_link_args.append('-mimpure-text')