components/python/python34/patches/03-setup.patch
author John Beck <John.Beck@Oracle.COM>
Wed, 29 Oct 2014 14:12:28 -0700
changeset 2183 5d00686e81da
parent 1953 5c1face45dc8
child 3759 6f5b34e14c5c
permissions -rw-r--r--
19782913 update Python to 3.4.2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
This patch modifies the setup script to support Solaris.
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
As it is Solaris-specific, it is not suitable for upstream.
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
2183
5d00686e81da 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 1953
diff changeset
     4
--- Python-3.4.2/setup.py.~2~	2014-09-22 12:58:20.756337175 -0700
5d00686e81da 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 1953
diff changeset
     5
+++ Python-3.4.2/setup.py	2014-09-22 12:58:20.806201115 -0700
5d00686e81da 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 1953
diff changeset
     6
@@ -736,6 +736,13 @@
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
                                                      ['/usr/lib/termcap'],
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
                                                      'termcap'):
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
                 readline_libs.append('termcap')
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
+
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
+            if host_platform == 'sunos5':
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
+                # insert '-zrecord' before the readline libraries that we
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
+                # want to link with to avoid rl_insert() elimination
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
+                readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
+                readline_libs = ()
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
+
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
             exts.append( Extension('readline', ['readline.c'],
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
                                    library_dirs=['/usr/lib/termcap'],
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
                                    extra_link_args=readline_extra_link_args,
2183
5d00686e81da 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 1953
diff changeset
    20
@@ -1918,7 +1925,7 @@
1907
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
             # this option. If you want to compile ctypes with the Sun
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
             # compiler, please research a proper solution, instead of
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
             # finding some -z option for the Sun compiler.
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
-            extra_link_args.append('-mimpure-text')
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
+            pass
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
 
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
         elif host_platform.startswith('hp-ux'):
446472de62e9 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
             extra_link_args.append('-fPIC')