|
1 diff --git Python-2.6.4/Modules/_multiprocessing/multiprocessing.h Python-2.6.4/Modules/_multiprocessing/multiprocessing.h |
|
2 --- Python-2.6.4/Modules/_multiprocessing/multiprocessing.h |
|
3 +++ Python-2.6.4/Modules/_multiprocessing/multiprocessing.h |
|
4 @@ -3,6 +3,10 @@ |
|
5 |
|
6 #define PY_SSIZE_T_CLEAN |
|
7 |
|
8 +/* needed on Solaris for the definition of CMSG_SPACE and friends */ |
|
9 +#define _XOPEN_SOURCE |
|
10 +#define _XOPEN_SOURCE_EXTENDED 1 |
|
11 + |
|
12 #include "Python.h" |
|
13 #include "structmember.h" |
|
14 #include "pythread.h" |
|
15 diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py |
|
16 new file mode 100644 |
|
17 --- Python-2.6.4/setup.py |
|
18 +++ Python-2.6.4/setup.py |
|
19 @@ -309,10 +309,10 @@ |
|
20 return sys.platform |
|
21 |
|
22 def detect_modules(self): |
|
23 - # Ensure that /usr/local is always used |
|
24 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
|
25 - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
|
26 - |
|
27 + if sys.platform != 'sunos5': |
|
28 + # Ensure that /usr/local is always used |
|
29 + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
|
30 + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
|
31 # Add paths specified in the environment variables LDFLAGS and |
|
32 # CPPFLAGS for header and library files. |
|
33 # We must get the values from the Makefile and not the environment |
|
34 @@ -610,11 +610,22 @@ |
|
35 exts.append( Extension('_csv', ['_csv.c']) ) |
|
36 |
|
37 # socket(2) |
|
38 + socket_libs = [] |
|
39 + if self.compiler.find_library_file(lib_dirs, |
|
40 + 'socket'): |
|
41 + socket_libs.append('socket') |
|
42 + if self.compiler.find_library_file(lib_dirs, |
|
43 + 'nsl'): |
|
44 + socket_libs.append('nsl') |
|
45 + if self.compiler.find_library_file(lib_dirs, |
|
46 + 'resolv'): |
|
47 + socket_libs.append('resolv') |
|
48 exts.append( Extension('_socket', ['socketmodule.c'], |
|
49 - depends = ['socketmodule.h']) ) |
|
50 + depends = ['socketmodule.h'], |
|
51 + libraries = socket_libs) ) |
|
52 # Detect SSL support for the socket module (via _ssl) |
|
53 search_for_ssl_incs_in = [ |
|
54 - '/usr/local/ssl/include', |
|
55 + '/usr/sfw/include', |
|
56 '/usr/contrib/ssl/include/' |
|
57 ] |
|
58 ssl_incs = find_file('openssl/ssl.h', inc_dirs, |
|
59 @@ -625,8 +636,12 @@ |
|
60 ['/usr/kerberos/include']) |
|
61 if krb5_h: |
|
62 ssl_incs += krb5_h |
|
63 + if sys.maxint == 2147483647L: |
|
64 + sfw_libdir = '/usr/sfw/lib'; |
|
65 + else: |
|
66 + sfw_libdir = '/usr/sfw/lib/64'; |
|
67 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, |
|
68 - ['/usr/local/ssl/lib', |
|
69 + [sfw_libdir, |
|
70 '/usr/contrib/ssl/lib/' |
|
71 ] ) |
|
72 |
|
73 @@ -635,6 +650,7 @@ |
|
74 exts.append( Extension('_ssl', ['_ssl.c'], |
|
75 include_dirs = ssl_incs, |
|
76 library_dirs = ssl_libs, |
|
77 + runtime_library_dirs = ssl_libs, |
|
78 libraries = ['ssl', 'crypto'], |
|
79 depends = ['socketmodule.h']), ) |
|
80 else: |
|
81 @@ -1079,6 +1095,14 @@ |
|
82 |
|
83 # Curses support, requiring the System V version of curses, often |
|
84 # provided by the ncurses library. |
|
85 + curses_lib_dirs = [] |
|
86 + curses_inc_dirs = [] |
|
87 + if platform == 'sunos5': |
|
88 + # look for ncurses in /usr/gnu on Solaris |
|
89 + curses_inc_dirs.append('/usr/include/ncurses') |
|
90 + curses_lib_dirs.append('/usr/gnu/lib') |
|
91 + curses_lib_dirs.append('/usr/gnu/lib/amd64') |
|
92 + curses_lib_dirs.append('/usr/gnu/lib/sparcv9') |
|
93 panel_library = 'panel' |
|
94 if (self.compiler.find_library_file(lib_dirs, 'ncursesw')): |
|
95 curses_libs = ['ncursesw'] |
|
96 @@ -1087,10 +1111,13 @@ |
|
97 panel_library = 'panelw' |
|
98 exts.append( Extension('_curses', ['_cursesmodule.c'], |
|
99 libraries = curses_libs) ) |
|
100 - elif (self.compiler.find_library_file(lib_dirs, 'ncurses')): |
|
101 + elif (self.compiler.find_library_file(lib_dirs + curses_lib_dirs, 'ncurses')): |
|
102 curses_libs = ['ncurses'] |
|
103 exts.append( Extension('_curses', ['_cursesmodule.c'], |
|
104 - libraries = curses_libs) ) |
|
105 + libraries = curses_libs, |
|
106 + library_dirs = curses_lib_dirs, |
|
107 + runtime_library_dirs = curses_lib_dirs, |
|
108 + include_dirs = curses_inc_dirs ) ) |
|
109 elif (self.compiler.find_library_file(lib_dirs, 'curses') |
|
110 and platform != 'darwin'): |
|
111 # OSX has an old Berkeley curses, not good enough for |
|
112 @@ -1109,9 +1136,12 @@ |
|
113 |
|
114 # If the curses module is enabled, check for the panel module |
|
115 if (module_enabled(exts, '_curses') and |
|
116 - self.compiler.find_library_file(lib_dirs, panel_library)): |
|
117 + self.compiler.find_library_file(lib_dirs + curses_lib_dirs, panel_library)): |
|
118 exts.append( Extension('_curses_panel', ['_curses_panel.c'], |
|
119 - libraries = [panel_library] + curses_libs) ) |
|
120 + libraries = [panel_library] + curses_libs, |
|
121 + include_dirs = curses_inc_dirs, |
|
122 + library_dirs = curses_lib_dirs, |
|
123 + runtime_library_dirs = curses_lib_dirs ) ) |
|
124 else: |
|
125 missing.append('_curses_panel') |
|
126 |
|
127 @@ -1324,8 +1354,13 @@ |
|
128 if macros.get('HAVE_SEM_OPEN', False): |
|
129 multiprocessing_srcs.append('_multiprocessing/semaphore.c') |
|
130 |
|
131 + multiproc_libs = [] |
|
132 + if platform == 'sunos5': |
|
133 + multiproc_libs = [ "xnet" ] |
|
134 + |
|
135 exts.append ( Extension('_multiprocessing', multiprocessing_srcs, |
|
136 define_macros=macros.items(), |
|
137 + libraries=multiproc_libs, |
|
138 include_dirs=["Modules/_multiprocessing"])) |
|
139 # End multiprocessing |
|
140 |
|
141 @@ -1549,15 +1584,26 @@ |
|
142 # Assume we haven't found any of the libraries or include files |
|
143 # The versions with dots are used on Unix, and the versions without |
|
144 # dots on Windows, for detection by cygwin. |
|
145 + added_lib_dirs = [] |
|
146 + tcl_tk_lib_dirs = ['/usr/sfw/lib'] |
|
147 + tcl_tk_inc_dirs = ['/usr/sfw/include'] |
|
148 tcllib = tklib = tcl_includes = tk_includes = None |
|
149 for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2', |
|
150 '82', '8.1', '81', '8.0', '80']: |
|
151 - tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version) |
|
152 - tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version) |
|
153 + tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version, tcl_tk_lib_dirs) |
|
154 + tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version, tcl_tk_lib_dirs) |
|
155 if tklib and tcllib: |
|
156 # Exit the loop when we've found the Tcl/Tk libraries |
|
157 break |
|
158 |
|
159 + tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version) |
|
160 + tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version) |
|
161 + if tklib and tcllib: |
|
162 + # found the libs in a non-standard dir |
|
163 + added_lib_dirs.append(os.path.dirname(tcllib)) |
|
164 + # Exit the loop when we've found the Tcl/Tk libraries |
|
165 + break |
|
166 + |
|
167 # Now check for the header files |
|
168 if tklib and tcllib: |
|
169 # Check for the include files on Debian and {Free,Open}BSD, where |
|
170 @@ -1572,6 +1618,7 @@ |
|
171 for dir in inc_dirs: |
|
172 tcl_include_sub += [dir + os.sep + "tcl" + dotversion] |
|
173 tk_include_sub += [dir + os.sep + "tk" + dotversion] |
|
174 + tcl_include_sub += tcl_tk_inc_dirs |
|
175 tk_include_sub += tcl_include_sub |
|
176 tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub) |
|
177 tk_includes = find_file('tk.h', inc_dirs, tk_include_sub) |
|
178 @@ -1636,6 +1683,7 @@ |
|
179 include_dirs = include_dirs, |
|
180 libraries = libs, |
|
181 library_dirs = added_lib_dirs, |
|
182 + runtime_library_dirs = added_lib_dirs |
|
183 ) |
|
184 self.extensions.append(ext) |
|
185 |
|
186 diff --git Python-2.6.4/Lib/site-packages/vendor-packages.pth Python2.6.4/Lib/site-packages/vendor-packages.pth |
|
187 --- /dev/null Sat Feb 12 00:21:26 2011 |
|
188 +++ Python-2.6.4/Lib/site-packages/vendor-packages.pth Sat Feb 12 00:47:05 2011 |
|
189 @@ -0,0 +1,1 @@ |
|
190 +import site; site.addsitedir('/usr/lib/python2.6/vendor-packages') |