author | John Beck <John.Beck@Oracle.COM> |
Thu, 18 Dec 2014 16:14:01 -0800 | |
branch | s11u2-sru |
changeset 3611 | e09fa6c4472b |
parent 3379 | e99da14b537a |
child 3978 | adf3ab1a234a |
permissions | -rw-r--r-- |
3379
e99da14b537a
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. |
e99da14b537a
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. |
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
3 |
|
3611
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
4 |
--- Python-2.7.9/setup.py.~1~ 2014-12-10 08:00:01.000000000 -0800 |
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
5 |
+++ Python-2.7.9/setup.py 2014-12-17 11:39:50.963351605 -0800 |
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
6 |
@@ -439,9 +439,9 @@ |
458 | 7 |
|
8 |
def detect_modules(self): |
|
9 |
# Ensure that /usr/local is always used |
|
3379
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
10 |
- if not cross_compiling: |
e99da14b537a
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') |
e99da14b537a
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') |
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
13 |
+ # if not cross_compiling: |
e99da14b537a
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') |
e99da14b537a
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') |
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
16 |
if cross_compiling: |
e99da14b537a
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() |
3611
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
19 |
@@ -765,6 +765,13 @@ |
458 | 20 |
['/usr/lib/termcap'], |
21 |
'termcap'): |
|
22 |
readline_libs.append('termcap') |
|
23 |
+ |
|
3379
e99da14b537a
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, |
|
3611
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
33 |
@@ -786,7 +793,7 @@ |
458 | 34 |
# socket(2) |
3379
e99da14b537a
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'], |
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
36 |
depends=['socketmodule.h'], |
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
37 |
- libraries=math_libs) ) |
e99da14b537a
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 = [ |
|
3379
e99da14b537a
PSARC 2014/183 Python 2.7.6
John Beck <John.Beck@Oracle.COM>
parents:
885
diff
changeset
|
41 |
'/usr/local/ssl/include', |
3611
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
42 |
@@ -1587,9 +1594,14 @@ |
458 | 43 |
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): |
44 |
multiprocessing_srcs.append('_multiprocessing/semaphore.c') |
|
45 |
||
46 |
+ multiproc_libs = [] |
|
3379
e99da14b537a
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') |
|
3611
e09fa6c4472b
20230129 update Python 2.7 line to version 2.7.9
John Beck <John.Beck@Oracle.COM>
parents:
3379
diff
changeset
|
57 |
@@ -2083,7 +2095,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 |
||
3379
e99da14b537a
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') |