components/python/python27/patches/02-setup.patch
author John Beck <John.Beck@Oracle.COM>
Thu, 22 May 2014 14:36:47 -0700
changeset 1914 00e8dbcb9b1e
parent 885 2af25a1da825
child 1954 32663e59626d
permissions -rw-r--r--
PSARC 2014/183 Python 2.7.6 18251953 update Python 2.7 line to version 2.7.6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     1
--- Python-2.7.6/setup.py.~1~	2013-11-09 23:36:41.000000000 -0800
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     2
+++ Python-2.7.6/setup.py	2014-05-14 12:46:04.859407465 -0700
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     3
@@ -437,9 +437,9 @@
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
 
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
     def detect_modules(self):
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
         # Ensure that /usr/local is always used
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     7
-        if not cross_compiling:
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     8
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
     9
-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    10
+        # if not cross_compiling:
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    11
+        #   add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    12
+        #   add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    13
         if cross_compiling:
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    14
             self.add_gcc_paths()
885
2af25a1da825 7177355 python 2.7.1 should be updated to the latest 2.7.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 458
diff changeset
    15
         self.add_multiarch_paths()
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    16
@@ -761,6 +761,13 @@
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
                                                      ['/usr/lib/termcap'],
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
                                                      'termcap'):
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
                 readline_libs.append('termcap')
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
+
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    21
+	    if host_platform == 'sunos5':
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
+		# insert '-zrecord' before the readline libraries that we
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
+		# want to link with to avoid rl_insert() elimination
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
+		readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
+		readline_libs = ()
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
+
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
             exts.append( Extension('readline', ['readline.c'],
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
                                    library_dirs=['/usr/lib/termcap'],
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    29
                                    extra_link_args=readline_extra_link_args,
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    30
@@ -2075,7 +2082,8 @@
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
             # this option. If you want to compile ctypes with the Sun
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
             # compiler, please research a proper solution, instead of
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
             # finding some -z option for the Sun compiler.
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
-            extra_link_args.append('-mimpure-text')
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
+            #extra_link_args.append('-mimpure-text')
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    36
+            pass
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    37
 
1914
00e8dbcb9b1e PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents: 885
diff changeset
    38
         elif host_platform.startswith('hp-ux'):
458
2edc011b559e 7004671 Add Python 2.7.1
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
             extra_link_args.append('-fPIC')