components/python/python34/patches/03-setup.patch
changeset 4964 30f7741bb742
parent 3759 6f5b34e14c5c
child 5476 f1df93f6aff1
equal deleted inserted replaced
4963:54be9ccc004f 4964:30f7741bb742
     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-3.4.2/setup.py.~2~	2015-02-09 18:43:32.656965175 -0800
     4 --- Python-3.4.3/setup.py.~2~	2015-03-16 12:52:28.721744829 -0700
     5 +++ Python-3.4.2/setup.py	2015-02-09 19:28:55.015474602 -0800
     5 +++ Python-3.4.3/setup.py	2015-03-16 12:58:55.474886590 -0700
     6 @@ -447,12 +447,15 @@
     6 @@ -447,12 +447,15 @@
     7              os.unlink(tmpfile)
     7              os.unlink(tmpfile)
     8  
     8  
     9      def detect_modules(self):
     9      def detect_modules(self):
    10 -        # Ensure that /usr/local is always used, but the local build
    10 -        # Ensure that /usr/local is always used, but the local build
    36 +                readline_libs = ()
    36 +                readline_libs = ()
    37 +
    37 +
    38              exts.append( Extension('readline', ['readline.c'],
    38              exts.append( Extension('readline', ['readline.c'],
    39                                     library_dirs=['/usr/lib/termcap'],
    39                                     library_dirs=['/usr/lib/termcap'],
    40                                     extra_link_args=readline_extra_link_args,
    40                                     extra_link_args=readline_extra_link_args,
    41 @@ -1295,6 +1305,8 @@
    41 @@ -759,7 +769,8 @@
       
    42  
       
    43          # socket(2)
       
    44          exts.append( Extension('_socket', ['socketmodule.c'],
       
    45 -                               depends = ['socketmodule.h']) )
       
    46 +                               depends = ['socketmodule.h'],
       
    47 +                               libraries = ['socket', 'nsl']) )
       
    48          # Detect SSL support for the socket module (via _ssl)
       
    49          search_for_ssl_incs_in = [
       
    50                                '/usr/local/ssl/include',
       
    51 @@ -1295,6 +1306,8 @@
    42              curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))
    52              curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))
    43  
    53  
    44          if curses_library.startswith('ncurses'):
    54          if curses_library.startswith('ncurses'):
    45 +            if host_platform == 'sunos5':
    55 +            if host_platform == 'sunos5':
    46 +                curses_includes.append('/usr/include/ncurses')
    56 +                curses_includes.append('/usr/include/ncurses')
    47              curses_libs = [curses_library]
    57              curses_libs = [curses_library]
    48              exts.append( Extension('_curses', ['_cursesmodule.c'],
    58              exts.append( Extension('_curses', ['_cursesmodule.c'],
    49                                     include_dirs=curses_includes,
    59                                     include_dirs=curses_includes,
    50 @@ -1319,10 +1331,32 @@
    60 @@ -1319,10 +1332,32 @@
    51          # If the curses module is enabled, check for the panel module
    61          # If the curses module is enabled, check for the panel module
    52          if (module_enabled(exts, '_curses') and
    62          if (module_enabled(exts, '_curses') and
    53              self.compiler.find_library_file(lib_dirs, panel_library)):
    63              self.compiler.find_library_file(lib_dirs, panel_library)):
    54 +            panel_lib_dirs = []
    64 +            panel_lib_dirs = []
    55 +            if host_platform == 'sunos5':
    65 +            if host_platform == 'sunos5':
    79 +                                   library_dirs = panel_lib_dirs,
    89 +                                   library_dirs = panel_lib_dirs,
    80 +                                   runtime_library_dirs = panel_lib_dirs) )
    90 +                                   runtime_library_dirs = panel_lib_dirs) )
    81          else:
    91          else:
    82              missing.append('_curses_panel')
    92              missing.append('_curses_panel')
    83  
    93  
    84 @@ -1918,7 +1952,7 @@
    94 @@ -1918,7 +1953,7 @@
    85              # this option. If you want to compile ctypes with the Sun
    95              # this option. If you want to compile ctypes with the Sun
    86              # compiler, please research a proper solution, instead of
    96              # compiler, please research a proper solution, instead of
    87              # finding some -z option for the Sun compiler.
    97              # finding some -z option for the Sun compiler.
    88 -            extra_link_args.append('-mimpure-text')
    98 -            extra_link_args.append('-mimpure-text')
    89 +            pass
    99 +            pass