diff -uN Python-3.1.1/configure Python-3.1.1Old/configure --- Python-3.1.1/configure 2009-06-09 07:22:57.000000000 +1000 +++ Python-3.1.1Old/configure 2009-08-17 12:57:50.000000000 +1000 @@ -17208,14 +17208,14 @@ # exit Python { echo "$as_me:$LINENO: checking for chflags" >&5 echo $ECHO_N "checking for chflags... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF +#if test "$cross_compiling" = yes; then +# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&5 +#echo "$as_me: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&2;} +# { (exit 1); exit 1; }; } +#else +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17270,20 +17270,20 @@ fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +#fi { echo "$as_me:$LINENO: checking for lchflags" >&5 echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF +#if test "$cross_compiling" = yes; then +# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&5 +#echo "$as_me: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&2;} +# { (exit 1); exit 1; }; } +#else +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17338,7 +17338,7 @@ fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +#fi @@ -25147,14 +25147,14 @@ { echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; } -if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF +#if test "$cross_compiling" = yes; then +# { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&5 +#echo "$as_me: error: cannot run test program while cross compiling +#See \`config.log' for more details." >&2;} +# { (exit 1); exit 1; }; } +#else +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -25232,7 +25232,7 @@ echo "${ECHO_T}no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +#fi diff -uN Python-3.1.1/configure.in Python-3.1.1Old/configure.in --- Python-3.1.1/configure.in 2009-06-09 07:22:57.000000000 +1000 +++ Python-3.1.1Old/configure.in 2009-08-17 12:57:50.000000000 +1000 @@ -3798,48 +3798,48 @@ AC_MSG_RESULT(no) fi -AC_MSG_CHECKING(for %zd printf() format support) -AC_TRY_RUN([#include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_SSIZE_T -typedef ssize_t Py_ssize_t; -#elif SIZEOF_VOID_P == SIZEOF_LONG -typedef long Py_ssize_t; -#else -typedef int Py_ssize_t; -#endif - -int main() -{ - char buffer[256]; - - if(sprintf(buffer, "%zd", (size_t)123) < 0) - return 1; - - if (strcmp(buffer, "123")) - return 1; - - if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) - return 1; - - if (strcmp(buffer, "-123")) - return 1; - - return 0; -}], -[AC_MSG_RESULT(yes) - AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], - AC_MSG_RESULT(no)) +#AC_MSG_CHECKING(for %zd printf() format support) +#AC_TRY_RUN([#include +##include +##include + +##ifdef HAVE_SYS_TYPES_H +##include +##endif + +##ifdef HAVE_SSIZE_T +#typedef ssize_t Py_ssize_t; +##elif SIZEOF_VOID_P == SIZEOF_LONG +#typedef long Py_ssize_t; +##else +#typedef int Py_ssize_t; +##endif +# +#int main() +#{ +# char buffer[256]; +# +# if(sprintf(buffer, "%zd", (size_t)123) < 0) +# return 1;# +# +# if (strcmp(buffer, "123")) +# return 1; +# +# if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) +# return 1; +# +# if (strcmp(buffer, "-123")) +# return 1; +# +# return 0; +#}], +#[AC_MSG_RESULT(yes) +# AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], +# AC_MSG_RESULT(no)) AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, - Define to `int' if does not define.),[ + Define to 'int' if does not define.),[ #ifdef HAVE_SYS_TYPES_H #include #endif Common subdirectories: Python-3.1.1/Demo and Python-3.1.1Old/Demo Common subdirectories: Python-3.1.1/Doc and Python-3.1.1Old/Doc Common subdirectories: Python-3.1.1/Grammar and Python-3.1.1Old/Grammar Common subdirectories: Python-3.1.1/Include and Python-3.1.1Old/Include Common subdirectories: Python-3.1.1/Lib and Python-3.1.1Old/Lib Common subdirectories: Python-3.1.1/Mac and Python-3.1.1Old/Mac diff -uN Python-3.1.1/Makefile.pre.in Python-3.1.1Old/Makefile.pre.in --- Python-3.1.1/Makefile.pre.in 2009-06-12 08:54:11.000000000 +1000 +++ Python-3.1.1Old/Makefile.pre.in 2009-08-17 13:48:59.000000000 +1000 @@ -177,6 +177,7 @@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) +HOSTPYTHON= ./$(BUILDPYTHON) # The task to run while instrument when building the profile-opt target PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck @@ -218,6 +219,8 @@ # Parser PGEN= Parser/pgen$(EXE) +HOSTPGEN= $(PGEN) + POBJS= \ Parser/acceler.o \ Parser/grammar1.o \ @@ -417,8 +420,8 @@ # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ esac # Build static library @@ -542,7 +545,7 @@ $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) -@$(INSTALL) -d Include - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) $(PGEN): $(PGENOBJS) $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) @@ -908,25 +911,25 @@ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding' \ $(DESTDIR)$(LIBDEST) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(BUILDPYTHON) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + ./$(HOSTPYTHON) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" # Create the PLATDIR source directory, if one wasn't distributed.. $(srcdir)/Lib/$(PLATDIR): @@ -1018,7 +1021,8 @@ # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ + CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILE='$(CROSS_COMPILE)' \ + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ Common subdirectories: Python-3.1.1/Misc and Python-3.1.1Old/Misc Common subdirectories: Python-3.1.1/Modules and Python-3.1.1Old/Modules Common subdirectories: Python-3.1.1/Objects and Python-3.1.1Old/Objects Common subdirectories: Python-3.1.1/Parser and Python-3.1.1Old/Parser Common subdirectories: Python-3.1.1/PC and Python-3.1.1Old/PC Common subdirectories: Python-3.1.1/PCbuild and Python-3.1.1Old/PCbuild Common subdirectories: Python-3.1.1/Python and Python-3.1.1Old/Python diff -uN Python-3.1.1/setup.py Python-3.1.1Old/setup.py --- Python-3.1.1/setup.py 2009-08-13 04:39:44.000000000 +1000 +++ Python-3.1.1Old/setup.py 2009-08-17 13:53:38.000000000 +1000 @@ -16,7 +16,7 @@ from distutils.command.install_lib import install_lib # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] +disabled_module_list = ['_ctypes'] def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if @@ -246,6 +246,10 @@ self.announce('WARNING: skipping import check for Cygwin-based "%s"' % ext.name) return + + if os.environ.get('CROSS_COMPILE_TARGET') == 'yes': + return + ext_filename = os.path.join( self.build_lib, self.get_ext_filename(self.get_ext_fullname(ext.name))) @@ -258,27 +262,31 @@ try: imp.load_dynamic(ext.name, ext_filename) except ImportError as why: - self.failed.append(ext.name) - self.announce('*** WARNING: renaming "%s" since importing it' - ' failed: %s' % (ext.name, why), level=3) - assert not self.inplace - basename, tail = os.path.splitext(ext_filename) - newname = basename + "_failed" + tail - if os.path.exists(newname): - os.remove(newname) - os.rename(ext_filename, newname) - - # XXX -- This relies on a Vile HACK in - # distutils.command.build_ext.build_extension(). The - # _built_objects attribute is stored there strictly for - # use here. - # If there is a failure, _built_objects may not be there, - # so catch the AttributeError and move on. - try: - for filename in self._built_objects: - os.remove(filename) - except AttributeError: - self.announce('unable to remove files (ignored)') + if os.environ.get('CROSS_COMPILE_TARGET') != "yes": + self.announce('*** WARNING: renaming "%s" since importing it' + ' failed: %s' % (ext.name, why), level=3) + assert not self.inplace + basename, tail = os.path.splitext(ext_filename) + newname = basename + "_failed" + tail + if os.path.exists(newname): + os.remove(newname) + os.rename(ext_filename, newname) + + # XXX -- This relies on a Vile HACK in + # distutils.command.build_ext.build_extension(). The + # _built_objects attribute is stored there strictly for + # use here. + # If there is a failure, _built_objects may not be there, + # so catch the AttributeError and move on. + try: + for filename in self._built_objects: + os.remove(filename) + except AttributeError: + self.announce('unable to remove files (ignored)') + else: + self.announce('WARNING: "%s" failed importing, but we leave it ' + 'because we are cross-compiling' % + ext.name) except: exc_type, why, tb = sys.exc_info() self.announce('*** WARNING: importing extension "%s" ' Common subdirectories: Python-3.1.1/Tools and Python-3.1.1Old/Tools