author | John Beck <John.Beck@Oracle.COM> |
Sat, 04 Oct 2014 14:50:43 -0700 | |
branch | s11-update |
changeset 3367 | ed5024e47b53 |
parent 885 | 2af25a1da825 |
child 3565 | 2d729d36ded7 |
permissions | -rw-r--r-- |
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
1 |
This patch modifies the setup script to support Solaris. |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
2 |
As it is Solaris-specific, it is not suitable for upstream. |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
3 |
|
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
4 |
--- Python-2.7.8/setup.py.~1~ 2014-06-29 19:05:48.000000000 -0700 |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
5 |
+++ Python-2.7.8/setup.py 2014-07-17 20:37:57.419011542 -0700 |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
6 |
@@ -437,9 +437,9 @@ |
458 | 7 |
|
8 |
def detect_modules(self): |
|
9 |
# Ensure that /usr/local is always used |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
10 |
- if not cross_compiling: |
ed5024e47b53
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') |
ed5024e47b53
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') |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
13 |
+ # if not cross_compiling: |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
14 |
+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
15 |
+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
16 |
if cross_compiling: |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
17 |
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
|
18 |
self.add_multiarch_paths() |
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
19 |
@@ -763,6 +763,13 @@ |
458 | 20 |
['/usr/lib/termcap'], |
21 |
'termcap'): |
|
22 |
readline_libs.append('termcap') |
|
23 |
+ |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
24 |
+ if host_platform == 'sunos5': |
458 | 25 |
+ # insert '-zrecord' before the readline libraries that we |
26 |
+ # want to link with to avoid rl_insert() elimination |
|
27 |
+ readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses') |
|
28 |
+ readline_libs = () |
|
29 |
+ |
|
30 |
exts.append( Extension('readline', ['readline.c'], |
|
31 |
library_dirs=['/usr/lib/termcap'], |
|
32 |
extra_link_args=readline_extra_link_args, |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
33 |
@@ -784,7 +791,7 @@ |
458 | 34 |
# socket(2) |
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
35 |
exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'], |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
36 |
depends=['socketmodule.h'], |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
37 |
- libraries=math_libs) ) |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
38 |
+ libraries=math_libs + ['socket', 'nsl']) ) |
458 | 39 |
# Detect SSL support for the socket module (via _ssl) |
40 |
search_for_ssl_incs_in = [ |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
41 |
'/usr/local/ssl/include', |
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
42 |
@@ -1585,9 +1592,14 @@ |
458 | 43 |
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): |
44 |
multiprocessing_srcs.append('_multiprocessing/semaphore.c') |
|
45 |
||
46 |
+ multiproc_libs = [] |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
47 |
+ if host_platform == 'sunos5': |
458 | 48 |
+ multiproc_libs = [ "xnet" ] |
49 |
+ |
|
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"])) |
|
55 |
else: |
|
56 |
missing.append('_multiprocessing') |
|
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
57 |
@@ -2081,7 +2088,8 @@ |
458 | 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') |
|
63 |
+ pass |
|
64 |
||
3367
ed5024e47b53
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
65 |
elif host_platform.startswith('hp-ux'): |
458 | 66 |
extra_link_args.append('-fPIC') |