1 diff -purN Python-2.6.2.orig/Makefile.pre.in Python-2.6.2/Makefile.pre.in
2 --- Python-2.6.2.orig/Makefile.pre.in 2009-09-28 10:58:20.000000000 +0000
3 +++ Python-2.6.2/Makefile.pre.in 2009-09-28 10:59:26.000000000 +0000
4 @@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
7 BUILDPYTHON= python$(BUILDEXE)
8 +HOSTPYTHON= ./$(BUILDPYTHON)
10 # The task to run while instrument when building the profile-opt target
11 PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
12 @@ -206,6 +207,8 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
14 PGEN= Parser/pgen$(EXE)
21 @@ -394,8 +397,8 @@ platform: $(BUILDPYTHON)
22 # Build the shared modules
23 sharedmods: $(BUILDPYTHON)
24 @case $$MAKEFLAGS in \
25 - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
26 - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
27 + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
28 + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
31 # Build static library
32 @@ -517,7 +520,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
34 $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
35 -@$(INSTALL) -d Include
36 - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
37 + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
40 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
41 @@ -886,24 +889,24 @@ libinstall: build_all $(srcdir)/Lib/$(PL
44 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
45 - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
46 - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
47 + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
48 + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
50 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
51 - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
52 - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
53 + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
54 + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
56 -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
57 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
58 - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
59 + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
60 -d $(LIBDEST)/site-packages -f \
61 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
62 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
63 - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
64 + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
65 -d $(LIBDEST)/site-packages -f \
66 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
67 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
68 - ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
69 + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
71 # Create the PLATDIR source directory, if one wasn't distributed..
72 $(srcdir)/Lib/$(PLATDIR):
73 @@ -1001,8 +1004,9 @@ libainstall: all
74 # Install the dynamically loadable modules
75 # This goes into $(exec_prefix)
77 - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
78 - --prefix=$(prefix) \
79 + CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILE='$(CROSS_COMPILE)' \
80 + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
81 + --prefix=$(prefix) \
82 --install-scripts=$(BINDIR) \
83 --install-platlib=$(DESTSHARED) \
85 diff -purN Python-2.6.2.orig/configure Python-2.6.2/configure
86 --- Python-2.6.2.orig/configure 2009-09-28 10:58:20.000000000 +0000
87 +++ Python-2.6.2/configure 2009-09-28 10:59:26.000000000 +0000
88 @@ -17054,151 +17054,17 @@ fi
93 -# On Tru64, chflags seems to be present, but calling it will
95 -{ echo "$as_me:$LINENO: checking for chflags" >&5
96 -echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
97 -if test "$cross_compiling" = yes; then
98 - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
99 -See \`config.log' for more details." >&5
100 -echo "$as_me: error: cannot run test program while cross compiling
101 -See \`config.log' for more details." >&2;}
102 - { (exit 1); exit 1; }; }
104 - cat >conftest.$ac_ext <<_ACEOF
107 -cat confdefs.h >>conftest.$ac_ext
108 -cat >>conftest.$ac_ext <<_ACEOF
109 -/* end confdefs.h. */
111 -#include <sys/stat.h>
113 -int main(int argc, char*argv[])
115 - if(chflags(argv[0], 0) != 0)
121 -rm -f conftest$ac_exeext
122 -if { (ac_try="$ac_link"
124 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
125 - *) ac_try_echo=$ac_try;;
127 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
128 - (eval "$ac_link") 2>&5
130 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
131 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
132 - { (case "(($ac_try" in
133 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
134 - *) ac_try_echo=$ac_try;;
136 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
137 - (eval "$ac_try") 2>&5
139 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
140 - (exit $ac_status); }; }; then
142 -cat >>confdefs.h <<\_ACEOF
143 -#define HAVE_CHFLAGS 1
146 - { echo "$as_me:$LINENO: result: yes" >&5
147 -echo "${ECHO_T}yes" >&6; }
149 - echo "$as_me: program exited with status $ac_status" >&5
150 -echo "$as_me: failed program was:" >&5
151 -sed 's/^/| /' conftest.$ac_ext >&5
154 -{ echo "$as_me:$LINENO: result: no" >&5
155 -echo "${ECHO_T}no" >&6; }
158 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
163 -{ echo "$as_me:$LINENO: checking for lchflags" >&5
164 -echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
165 -if test "$cross_compiling" = yes; then
166 - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
167 -See \`config.log' for more details." >&5
168 -echo "$as_me: error: cannot run test program while cross compiling
169 -See \`config.log' for more details." >&2;}
170 - { (exit 1); exit 1; }; }
172 - cat >conftest.$ac_ext <<_ACEOF
175 -cat confdefs.h >>conftest.$ac_ext
176 -cat >>conftest.$ac_ext <<_ACEOF
177 -/* end confdefs.h. */
179 -#include <sys/stat.h>
181 -int main(int argc, char*argv[])
183 - if(lchflags(argv[0], 0) != 0)
189 -rm -f conftest$ac_exeext
190 -if { (ac_try="$ac_link"
192 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
193 - *) ac_try_echo=$ac_try;;
195 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
196 - (eval "$ac_link") 2>&5
198 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
199 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
200 - { (case "(($ac_try" in
201 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
202 - *) ac_try_echo=$ac_try;;
204 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
205 - (eval "$ac_try") 2>&5
207 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
208 - (exit $ac_status); }; }; then
210 -cat >>confdefs.h <<\_ACEOF
211 -#define HAVE_LCHFLAGS 1
214 - { echo "$as_me:$LINENO: result: yes" >&5
215 -echo "${ECHO_T}yes" >&6; }
217 - echo "$as_me: program exited with status $ac_status" >&5
218 -echo "$as_me: failed program was:" >&5
219 -sed 's/^/| /' conftest.$ac_ext >&5
222 -{ echo "$as_me:$LINENO: result: no" >&5
223 -echo "${ECHO_T}no" >&6; }
226 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
230 +#cat >>confdefs.h <<_ACEOF
231 +##define HAVE_CHFLAGS 0
232 +##define HAVE_LCHFLAGS 0
235 case $ac_sys_system/$ac_sys_release in
237 _CUR_CFLAGS="${CFLAGS}"
238 _CUR_LDFLAGS="${LDFLAGS}"
239 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
240 - LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
241 + LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/lib"
245 @@ -24324,95 +24190,11 @@ else
246 echo "${ECHO_T}no" >&6; }
249 -{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
250 -echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
251 -if test "$cross_compiling" = yes; then
252 - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
253 -See \`config.log' for more details." >&5
254 -echo "$as_me: error: cannot run test program while cross compiling
255 -See \`config.log' for more details." >&2;}
256 - { (exit 1); exit 1; }; }
258 - cat >conftest.$ac_ext <<_ACEOF
261 -cat confdefs.h >>conftest.$ac_ext
262 -cat >>conftest.$ac_ext <<_ACEOF
263 -/* end confdefs.h. */
268 -#ifdef HAVE_SYS_TYPES_H
269 -#include <sys/types.h>
273 -typedef ssize_t Py_ssize_t;
274 -#elif SIZEOF_VOID_P == SIZEOF_LONG
275 -typedef long Py_ssize_t;
277 -typedef int Py_ssize_t;
284 - if(sprintf(buffer, "%zd", (size_t)123) < 0)
287 - if (strcmp(buffer, "123"))
290 - if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
293 - if (strcmp(buffer, "-123"))
299 -rm -f conftest$ac_exeext
300 -if { (ac_try="$ac_link"
302 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
303 - *) ac_try_echo=$ac_try;;
305 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
306 - (eval "$ac_link") 2>&5
308 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
309 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
310 - { (case "(($ac_try" in
311 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
312 - *) ac_try_echo=$ac_try;;
314 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
315 - (eval "$ac_try") 2>&5
317 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
318 - (exit $ac_status); }; }; then
319 - { echo "$as_me:$LINENO: result: yes" >&5
320 -echo "${ECHO_T}yes" >&6; }
322 cat >>confdefs.h <<\_ACEOF
323 #define PY_FORMAT_SIZE_T "z"
327 - echo "$as_me: program exited with status $ac_status" >&5
328 -echo "$as_me: failed program was:" >&5
329 -sed 's/^/| /' conftest.$ac_ext >&5
332 -{ echo "$as_me:$LINENO: result: no" >&5
333 -echo "${ECHO_T}no" >&6; }
335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
340 { echo "$as_me:$LINENO: checking for socklen_t" >&5
341 diff -purN Python-2.6.2.orig/setup.py Python-2.6.2/setup.py
342 --- Python-2.6.2.orig/setup.py 2009-09-28 10:58:20.000000000 +0000
343 +++ Python-2.6.2/setup.py 2009-09-28 10:59:31.000000000 +0000
344 @@ -273,15 +273,15 @@ class PyBuildExt(build_ext):
346 imp.load_dynamic(ext.name, ext_filename)
347 except ImportError, why:
348 - self.failed.append(ext.name)
349 - self.announce('*** WARNING: renaming "%s" since importing it'
350 - ' failed: %s' % (ext.name, why), level=3)
351 - assert not self.inplace
352 - basename, tail = os.path.splitext(ext_filename)
353 - newname = basename + "_failed" + tail
354 - if os.path.exists(newname):
356 - os.rename(ext_filename, newname)
357 + #self.failed.append(ext.name)
360 + #assert not self.inplace
361 + #basename, tail = os.path.splitext(ext_filename)
362 + #newname = basename + "_failed" + tail
363 + #if os.path.exists(newname):
364 + # os.remove(newname)
365 + #os.rename(ext_filename, newname)
367 # XXX -- This relies on a Vile HACK in
368 # distutils.command.build_ext.build_extension(). The
369 @@ -289,11 +289,11 @@ class PyBuildExt(build_ext):
371 # If there is a failure, _built_objects may not be there,
372 # so catch the AttributeError and move on.
374 - for filename in self._built_objects:
375 - os.remove(filename)
376 - except AttributeError:
377 - self.announce('unable to remove files (ignored)')
379 + # for filename in self._built_objects:
380 + # os.remove(filename)
381 + #except AttributeError:
382 + # self.announce('unable to remove files (ignored)')
384 exc_type, why, tb = sys.exc_info()
385 self.announce('*** WARNING: importing extension "%s" '