| 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@ |
| 5 | |
| 6 | PYTHON= python$(EXE) |
| 7 | BUILDPYTHON= python$(BUILDEXE) |
| 8 | +HOSTPYTHON= ./$(BUILDPYTHON) |
| 9 | |
| 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 |
| 13 | # Parser |
| 14 | PGEN= Parser/pgen$(EXE) |
| 15 | |
| 16 | +HOSTPGEN= $(PGEN) |
| 17 | + |
| 18 | POBJS= \ |
| 19 | Parser/acceler.o \ |
| 20 | Parser/grammar1.o \ |
| 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;; \ |
| 29 | esac |
| 30 | |
| 31 | # Build static library |
| 32 | @@ -517,7 +520,7 @@ Modules/python.o: $(srcdir)/Modules/pyth |
| 33 | |
| 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) |
| 38 | |
| 39 | $(PGEN): $(PGENOBJS) |
| 40 | $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) |
| 41 | @@ -886,24 +889,24 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
| 42 | done; \ |
| 43 | done |
| 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 \ |
| 49 | -d $(LIBDEST) -f \ |
| 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 \ |
| 55 | -d $(LIBDEST) -f \ |
| 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()" |
| 70 | |
| 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) |
| 76 | sharedinstall: |
| 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) \ |
| 84 | --root=/$(DESTDIR) |
| 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 |
| 89 | |
| 90 | fi |
| 91 | |
| 92 | - |
| 93 | -# On Tru64, chflags seems to be present, but calling it will |
| 94 | -# exit Python |
| 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; }; } |
| 103 | -else |
| 104 | - cat >conftest.$ac_ext <<_ACEOF |
| 105 | -/* confdefs.h. */ |
| 106 | -_ACEOF |
| 107 | -cat confdefs.h >>conftest.$ac_ext |
| 108 | -cat >>conftest.$ac_ext <<_ACEOF |
| 109 | -/* end confdefs.h. */ |
| 110 | - |
| 111 | -#include <sys/stat.h> |
| 112 | -#include <unistd.h> |
| 113 | -int main(int argc, char*argv[]) |
| 114 | -{ |
| 115 | - if(chflags(argv[0], 0) != 0) |
| 116 | - return 1; |
| 117 | - return 0; |
| 118 | -} |
| 119 | - |
| 120 | -_ACEOF |
| 121 | -rm -f conftest$ac_exeext |
| 122 | -if { (ac_try="$ac_link" |
| 123 | -case "(($ac_try" in |
| 124 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 125 | - *) ac_try_echo=$ac_try;; |
| 126 | -esac |
| 127 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 128 | - (eval "$ac_link") 2>&5 |
| 129 | - ac_status=$? |
| 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;; |
| 135 | -esac |
| 136 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 137 | - (eval "$ac_try") 2>&5 |
| 138 | - ac_status=$? |
| 139 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 140 | - (exit $ac_status); }; }; then |
| 141 | - |
| 142 | -cat >>confdefs.h <<\_ACEOF |
| 143 | -#define HAVE_CHFLAGS 1 |
| 144 | -_ACEOF |
| 145 | - |
| 146 | - { echo "$as_me:$LINENO: result: yes" >&5 |
| 147 | -echo "${ECHO_T}yes" >&6; } |
| 148 | -else |
| 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 |
| 152 | - |
| 153 | -( exit $ac_status ) |
| 154 | -{ echo "$as_me:$LINENO: result: no" >&5 |
| 155 | -echo "${ECHO_T}no" >&6; } |
| 156 | - |
| 157 | -fi |
| 158 | -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
| 159 | -fi |
| 160 | - |
| 161 | - |
| 162 | - |
| 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; }; } |
| 171 | -else |
| 172 | - cat >conftest.$ac_ext <<_ACEOF |
| 173 | -/* confdefs.h. */ |
| 174 | -_ACEOF |
| 175 | -cat confdefs.h >>conftest.$ac_ext |
| 176 | -cat >>conftest.$ac_ext <<_ACEOF |
| 177 | -/* end confdefs.h. */ |
| 178 | - |
| 179 | -#include <sys/stat.h> |
| 180 | -#include <unistd.h> |
| 181 | -int main(int argc, char*argv[]) |
| 182 | -{ |
| 183 | - if(lchflags(argv[0], 0) != 0) |
| 184 | - return 1; |
| 185 | - return 0; |
| 186 | -} |
| 187 | - |
| 188 | -_ACEOF |
| 189 | -rm -f conftest$ac_exeext |
| 190 | -if { (ac_try="$ac_link" |
| 191 | -case "(($ac_try" in |
| 192 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 193 | - *) ac_try_echo=$ac_try;; |
| 194 | -esac |
| 195 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 196 | - (eval "$ac_link") 2>&5 |
| 197 | - ac_status=$? |
| 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;; |
| 203 | -esac |
| 204 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 205 | - (eval "$ac_try") 2>&5 |
| 206 | - ac_status=$? |
| 207 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 208 | - (exit $ac_status); }; }; then |
| 209 | - |
| 210 | -cat >>confdefs.h <<\_ACEOF |
| 211 | -#define HAVE_LCHFLAGS 1 |
| 212 | -_ACEOF |
| 213 | - |
| 214 | - { echo "$as_me:$LINENO: result: yes" >&5 |
| 215 | -echo "${ECHO_T}yes" >&6; } |
| 216 | -else |
| 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 |
| 220 | - |
| 221 | -( exit $ac_status ) |
| 222 | -{ echo "$as_me:$LINENO: result: no" >&5 |
| 223 | -echo "${ECHO_T}no" >&6; } |
| 224 | - |
| 225 | -fi |
| 226 | -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
| 227 | -fi |
| 228 | - |
| 229 | - |
| 230 | +#cat >>confdefs.h <<_ACEOF |
| 231 | +##define HAVE_CHFLAGS 0 |
| 232 | +##define HAVE_LCHFLAGS 0 |
| 233 | +#_ACEOF |
| 234 | |
| 235 | case $ac_sys_system/$ac_sys_release in |
| 236 | Darwin/*) |
| 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" |
| 242 | ;; |
| 243 | esac |
| 244 | |
| 245 | @@ -24324,95 +24190,11 @@ else |
| 246 | echo "${ECHO_T}no" >&6; } |
| 247 | fi |
| 248 | |
| 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; }; } |
| 257 | -else |
| 258 | - cat >conftest.$ac_ext <<_ACEOF |
| 259 | -/* confdefs.h. */ |
| 260 | -_ACEOF |
| 261 | -cat confdefs.h >>conftest.$ac_ext |
| 262 | -cat >>conftest.$ac_ext <<_ACEOF |
| 263 | -/* end confdefs.h. */ |
| 264 | -#include <stdio.h> |
| 265 | -#include <stddef.h> |
| 266 | -#include <string.h> |
| 267 | - |
| 268 | -#ifdef HAVE_SYS_TYPES_H |
| 269 | -#include <sys/types.h> |
| 270 | -#endif |
| 271 | - |
| 272 | -#ifdef HAVE_SSIZE_T |
| 273 | -typedef ssize_t Py_ssize_t; |
| 274 | -#elif SIZEOF_VOID_P == SIZEOF_LONG |
| 275 | -typedef long Py_ssize_t; |
| 276 | -#else |
| 277 | -typedef int Py_ssize_t; |
| 278 | -#endif |
| 279 | - |
| 280 | -int main() |
| 281 | -{ |
| 282 | - char buffer[256]; |
| 283 | - |
| 284 | - if(sprintf(buffer, "%zd", (size_t)123) < 0) |
| 285 | - return 1; |
| 286 | - |
| 287 | - if (strcmp(buffer, "123")) |
| 288 | - return 1; |
| 289 | - |
| 290 | - if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) |
| 291 | - return 1; |
| 292 | - |
| 293 | - if (strcmp(buffer, "-123")) |
| 294 | - return 1; |
| 295 | - |
| 296 | - return 0; |
| 297 | -} |
| 298 | -_ACEOF |
| 299 | -rm -f conftest$ac_exeext |
| 300 | -if { (ac_try="$ac_link" |
| 301 | -case "(($ac_try" in |
| 302 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 303 | - *) ac_try_echo=$ac_try;; |
| 304 | -esac |
| 305 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 306 | - (eval "$ac_link") 2>&5 |
| 307 | - ac_status=$? |
| 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;; |
| 313 | -esac |
| 314 | -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 |
| 315 | - (eval "$ac_try") 2>&5 |
| 316 | - ac_status=$? |
| 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; } |
| 321 | - |
| 322 | cat >>confdefs.h <<\_ACEOF |
| 323 | #define PY_FORMAT_SIZE_T "z" |
| 324 | _ACEOF |
| 325 | |
| 326 | -else |
| 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 |
| 330 | - |
| 331 | -( exit $ac_status ) |
| 332 | -{ echo "$as_me:$LINENO: result: no" >&5 |
| 333 | -echo "${ECHO_T}no" >&6; } |
| 334 | -fi |
| 335 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
| 336 | -fi |
| 337 | - |
| 338 | |
| 339 | |
| 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): |
| 345 | try: |
| 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): |
| 355 | - os.remove(newname) |
| 356 | - os.rename(ext_filename, newname) |
| 357 | + #self.failed.append(ext.name) |
| 358 | + self.announce(' ' |
| 359 | + ' ', level=3) |
| 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) |
| 366 | |
| 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): |
| 370 | # use here. |
| 371 | # If there is a failure, _built_objects may not be there, |
| 372 | # so catch the AttributeError and move on. |
| 373 | - try: |
| 374 | - for filename in self._built_objects: |
| 375 | - os.remove(filename) |
| 376 | - except AttributeError: |
| 377 | - self.announce('unable to remove files (ignored)') |
| 378 | + #try: |
| 379 | + # for filename in self._built_objects: |
| 380 | + # os.remove(filename) |
| 381 | + #except AttributeError: |
| 382 | + # self.announce('unable to remove files (ignored)') |
| 383 | except: |
| 384 | exc_type, why, tb = sys.exc_info() |
| 385 | self.announce('*** WARNING: importing extension "%s" ' |