summaryrefslogtreecommitdiff
path: root/data/python
diff options
context:
space:
mode:
Diffstat (limited to 'data/python')
-rw-r--r--data/python/Python-2.5.1.tgzbin0 -> 11060830 bytes
l---------data/python/_metadata/berkeleydb.dep1
l---------data/python/_metadata/bzip2.dep1
-rw-r--r--data/python/_metadata/description2
l---------data/python/_metadata/expat.dep1
l---------data/python/_metadata/libffi.dep1
l---------data/python/_metadata/libxml2.dep1
-rw-r--r--data/python/_metadata/license270
l---------data/python/_metadata/maintainer1
l---------data/python/_metadata/openssl.dep1
-rw-r--r--data/python/_metadata/priority1
l---------data/python/_metadata/readline.dep1
-rw-r--r--data/python/_metadata/section1
l---------data/python/_metadata/sqlite3.dep1
-rw-r--r--data/python/_metadata/version1
-rw-r--r--data/python/bundle.diff32
-rw-r--r--data/python/clean.diff11
-rw-r--r--data/python/common.diff12
-rw-r--r--data/python/cross.diff429
-rw-r--r--data/python/distutils.diff115
-rw-r--r--data/python/dylib.diff33
-rw-r--r--data/python/environ.diff26
-rw-r--r--data/python/framework.diff28
-rw-r--r--data/python/make.sh23
-rw-r--r--data/python/modules.diff32
-rw-r--r--data/python/test.diff17
26 files changed, 1042 insertions, 0 deletions
diff --git a/data/python/Python-2.5.1.tgz b/data/python/Python-2.5.1.tgz
new file mode 100644
index 000000000..2ce439a2e
--- /dev/null
+++ b/data/python/Python-2.5.1.tgz
Binary files differ
diff --git a/data/python/_metadata/berkeleydb.dep b/data/python/_metadata/berkeleydb.dep
new file mode 120000
index 000000000..f945cb1a2
--- /dev/null
+++ b/data/python/_metadata/berkeleydb.dep
@@ -0,0 +1 @@
+../../berkeleydb \ No newline at end of file
diff --git a/data/python/_metadata/bzip2.dep b/data/python/_metadata/bzip2.dep
new file mode 120000
index 000000000..15aa44a77
--- /dev/null
+++ b/data/python/_metadata/bzip2.dep
@@ -0,0 +1 @@
+../../bzip2 \ No newline at end of file
diff --git a/data/python/_metadata/description b/data/python/_metadata/description
new file mode 100644
index 000000000..005d9a0c9
--- /dev/null
+++ b/data/python/_metadata/description
@@ -0,0 +1,2 @@
+this package isn't described yet
+This package, which I'm certain is incredibly interesting, has yet to be described. This is probably because Jay has spent days getting all kinds of bookkeeping issues, like copyright notifications, all in their correct places, and descriptions just aren't the most important thing he could be working on. If this is a problem, please come back later.
diff --git a/data/python/_metadata/expat.dep b/data/python/_metadata/expat.dep
new file mode 120000
index 000000000..2100fb19e
--- /dev/null
+++ b/data/python/_metadata/expat.dep
@@ -0,0 +1 @@
+../../expat \ No newline at end of file
diff --git a/data/python/_metadata/libffi.dep b/data/python/_metadata/libffi.dep
new file mode 120000
index 000000000..da9d6c358
--- /dev/null
+++ b/data/python/_metadata/libffi.dep
@@ -0,0 +1 @@
+../../libffi \ No newline at end of file
diff --git a/data/python/_metadata/libxml2.dep b/data/python/_metadata/libxml2.dep
new file mode 120000
index 000000000..076284360
--- /dev/null
+++ b/data/python/_metadata/libxml2.dep
@@ -0,0 +1 @@
+../../libxml2 \ No newline at end of file
diff --git a/data/python/_metadata/license b/data/python/_metadata/license
new file mode 100644
index 000000000..d8e1f80c5
--- /dev/null
+++ b/data/python/_metadata/license
@@ -0,0 +1,270 @@
+A. HISTORY OF THE SOFTWARE
+==========================
+
+Python was created in the early 1990s by Guido van Rossum at Stichting
+Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
+as a successor of a language called ABC. Guido remains Python's
+principal author, although it includes many contributions from others.
+
+In 1995, Guido continued his work on Python at the Corporation for
+National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
+in Reston, Virginia where he released several versions of the
+software.
+
+In May 2000, Guido and the Python core development team moved to
+BeOpen.com to form the BeOpen PythonLabs team. In October of the same
+year, the PythonLabs team moved to Digital Creations (now Zope
+Corporation, see http://www.zope.com). In 2001, the Python Software
+Foundation (PSF, see http://www.python.org/psf/) was formed, a
+non-profit organization created specifically to own Python-related
+Intellectual Property. Zope Corporation is a sponsoring member of
+the PSF.
+
+All Python releases are Open Source (see http://www.opensource.org for
+the Open Source Definition). Historically, most, but not all, Python
+releases have also been GPL-compatible; the table below summarizes
+the various releases.
+
+ Release Derived Year Owner GPL-
+ from compatible? (1)
+
+ 0.9.0 thru 1.2 1991-1995 CWI yes
+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
+ 1.6 1.5.2 2000 CNRI no
+ 2.0 1.6 2000 BeOpen.com no
+ 1.6.1 1.6 2001 CNRI yes (2)
+ 2.1 2.0+1.6.1 2001 PSF no
+ 2.0.1 2.0+1.6.1 2001 PSF yes
+ 2.1.1 2.1+2.0.1 2001 PSF yes
+ 2.2 2.1.1 2001 PSF yes
+ 2.1.2 2.1.1 2002 PSF yes
+ 2.1.3 2.1.2 2002 PSF yes
+ 2.2.1 2.2 2002 PSF yes
+ 2.2.2 2.2.1 2002 PSF yes
+ 2.2.3 2.2.2 2003 PSF yes
+ 2.3 2.2.2 2002-2003 PSF yes
+ 2.3.1 2.3 2002-2003 PSF yes
+ 2.3.2 2.3.1 2002-2003 PSF yes
+ 2.3.3 2.3.2 2002-2003 PSF yes
+ 2.3.4 2.3.3 2004 PSF yes
+ 2.3.5 2.3.4 2005 PSF yes
+ 2.4 2.3 2004 PSF yes
+ 2.4.1 2.4 2005 PSF yes
+ 2.4.2 2.4.1 2005 PSF yes
+ 2.4.3 2.4.2 2006 PSF yes
+ 2.5 2.4 2006 PSF yes
+ 2.5.1 2.5 2007 PSF yes
+
+Footnotes:
+
+(1) GPL-compatible doesn't mean that we're distributing Python under
+ the GPL. All Python licenses, unlike the GPL, let you distribute
+ a modified version without making your changes open source. The
+ GPL-compatible licenses make it possible to combine Python with
+ other software that is released under the GPL; the others don't.
+
+(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
+ because its license has a choice of law clause. According to
+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
+ is "not incompatible" with the GPL.
+
+Thanks to the many outside volunteers who have worked under Guido's
+direction to make these releases possible.
+
+
+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
+===============================================================
+
+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation
+("PSF"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("Python") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python
+alone or in any derivative version, provided, however, that PSF's
+License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
+2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software Foundation;
+All Rights Reserved" are retained in Python alone or in any derivative
+version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS"
+basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee. This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
+-------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
+office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
+Individual or Organization ("Licensee") accessing and otherwise using
+this software in source or binary form and its associated
+documentation ("the Software").
+
+2. Subject to the terms and conditions of this BeOpen Python License
+Agreement, BeOpen hereby grants Licensee a non-exclusive,
+royalty-free, world-wide license to reproduce, analyze, test, perform
+and/or display publicly, prepare derivative works, distribute, and
+otherwise use the Software alone or in any derivative version,
+provided, however, that the BeOpen Python License is retained in the
+Software, alone or in any derivative version prepared by Licensee.
+
+3. BeOpen is making the Software available to Licensee on an "AS IS"
+basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
+SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
+AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
+DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+5. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+6. This License Agreement shall be governed by and interpreted in all
+respects by the law of the State of California, excluding conflict of
+law provisions. Nothing in this License Agreement shall be deemed to
+create any relationship of agency, partnership, or joint venture
+between BeOpen and Licensee. This License Agreement does not grant
+permission to use BeOpen trademarks or trade names in a trademark
+sense to endorse or promote products or services of Licensee, or any
+third party. As an exception, the "BeOpen Python" logos available at
+http://www.pythonlabs.com/logos.html may be used according to the
+permissions granted on that web page.
+
+7. By copying, installing or otherwise using the software, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
+
+
+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
+---------------------------------------
+
+1. This LICENSE AGREEMENT is between the Corporation for National
+Research Initiatives, having an office at 1895 Preston White Drive,
+Reston, VA 20191 ("CNRI"), and the Individual or Organization
+("Licensee") accessing and otherwise using Python 1.6.1 software in
+source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, CNRI
+hereby grants Licensee a nonexclusive, royalty-free, world-wide
+license to reproduce, analyze, test, perform and/or display publicly,
+prepare derivative works, distribute, and otherwise use Python 1.6.1
+alone or in any derivative version, provided, however, that CNRI's
+License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
+1995-2001 Corporation for National Research Initiatives; All Rights
+Reserved" are retained in Python 1.6.1 alone or in any derivative
+version prepared by Licensee. Alternately, in lieu of CNRI's License
+Agreement, Licensee may substitute the following text (omitting the
+quotes): "Python 1.6.1 is made available subject to the terms and
+conditions in CNRI's License Agreement. This Agreement together with
+Python 1.6.1 may be located on the Internet using the following
+unique, persistent identifier (known as a handle): 1895.22/1013. This
+Agreement may also be obtained from a proxy server on the Internet
+using the following URL: http://hdl.handle.net/1895.22/1013".
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python 1.6.1 or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python 1.6.1.
+
+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
+basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. This License Agreement shall be governed by the federal
+intellectual property law of the United States, including without
+limitation the federal copyright law, and, to the extent such
+U.S. federal law does not apply, by the law of the Commonwealth of
+Virginia, excluding Virginia's conflict of law provisions.
+Notwithstanding the foregoing, with regard to derivative works based
+on Python 1.6.1 that incorporate non-separable material that was
+previously distributed under the GNU General Public License (GPL), the
+law of the Commonwealth of Virginia shall govern this License
+Agreement only as to issues arising under or with respect to
+Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
+License Agreement shall be deemed to create any relationship of
+agency, partnership, or joint venture between CNRI and Licensee. This
+License Agreement does not grant permission to use CNRI trademarks or
+trade name in a trademark sense to endorse or promote products or
+services of Licensee, or any third party.
+
+8. By clicking on the "ACCEPT" button where indicated, or by copying,
+installing or otherwise using Python 1.6.1, Licensee agrees to be
+bound by the terms and conditions of this License Agreement.
+
+ ACCEPT
+
+
+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
+--------------------------------------------------
+
+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
+The Netherlands. All rights reserved.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/data/python/_metadata/maintainer b/data/python/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/python/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/python/_metadata/openssl.dep b/data/python/_metadata/openssl.dep
new file mode 120000
index 000000000..9b58fd56b
--- /dev/null
+++ b/data/python/_metadata/openssl.dep
@@ -0,0 +1 @@
+../../openssl \ No newline at end of file
diff --git a/data/python/_metadata/priority b/data/python/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/python/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/python/_metadata/readline.dep b/data/python/_metadata/readline.dep
new file mode 120000
index 000000000..f35c9185b
--- /dev/null
+++ b/data/python/_metadata/readline.dep
@@ -0,0 +1 @@
+../../readline \ No newline at end of file
diff --git a/data/python/_metadata/section b/data/python/_metadata/section
new file mode 100644
index 000000000..463a353df
--- /dev/null
+++ b/data/python/_metadata/section
@@ -0,0 +1 @@
+programming
diff --git a/data/python/_metadata/sqlite3.dep b/data/python/_metadata/sqlite3.dep
new file mode 120000
index 000000000..071b20780
--- /dev/null
+++ b/data/python/_metadata/sqlite3.dep
@@ -0,0 +1 @@
+../../sqlite3 \ No newline at end of file
diff --git a/data/python/_metadata/version b/data/python/_metadata/version
new file mode 100644
index 000000000..73462a5a1
--- /dev/null
+++ b/data/python/_metadata/version
@@ -0,0 +1 @@
+2.5.1
diff --git a/data/python/bundle.diff b/data/python/bundle.diff
new file mode 100644
index 000000000..c7f38b986
--- /dev/null
+++ b/data/python/bundle.diff
@@ -0,0 +1,32 @@
+diff -r -u Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
+--- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
++++ Python-2.5.1+iPhone/configure.in 2008-01-09 11:45:20.000000000 +0000
+@@ -1484,7 +1484,12 @@
+ if test "${enable_universalsdk}"; then
+ LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
+ fi
+- LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
++ LDSHARED='$(CC) $(LDFLAGS) -undefined dynamic_lookup'
++ if test "$enable_framework" ; then
++ LDSHARED="$LDSHARED -bundle"
++ else
++ LDSHARED="$LDSHARED -dynamiclib"
++ fi
+ BLDSHARED="$LDSHARED"
+ else
+ LDSHARED='$(CC) $(LDFLAGS) -bundle'
+diff -r -u Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
+--- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
++++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 12:00:36.000000000 +0000
+@@ -362,9 +362,9 @@
+ $(AR) cr $@ $(MODOBJS)
+ $(RANLIB) $@
+
+-libpython$(VERSION).so: $(LIBRARY_OBJS)
++libpython$(VERSION).dylib: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+- $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
++ $(LDSHARED) -Wl,-dylib_install_name,$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+ $(LN) -f $(INSTSONAME) $@; \
+ else\
+ $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
diff --git a/data/python/clean.diff b/data/python/clean.diff
new file mode 100644
index 000000000..36d5ba186
--- /dev/null
+++ b/data/python/clean.diff
@@ -0,0 +1,11 @@
+diff -ru BuildPython-2.5.1/Makefile.pre.in Python-2.5.1/Makefile.pre.in
+--- BuildPython-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
++++ Python-2.5.1/Makefile.pre.in 2008-01-09 07:58:21.000000000 +0000
+@@ -1015,7 +1015,6 @@
+
+ clean: pycremoval
+ find . -name '*.o' -exec rm -f {} ';'
+- find . -name '*.s[ol]' -exec rm -f {} ';'
+ find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
+ find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
+
diff --git a/data/python/common.diff b/data/python/common.diff
new file mode 100644
index 000000000..fee4dd829
--- /dev/null
+++ b/data/python/common.diff
@@ -0,0 +1,12 @@
+diff -r -u Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
+--- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
++++ Python-2.5.1+iPhone/configure.in 2008-01-09 12:10:16.000000000 +0000
+@@ -814,7 +816,7 @@
+ ;;
+ # is there any other compiler on Darwin besides gcc?
+ Darwin*)
+- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
++ BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common"
+ if test "${enable_universalsdk}"; then
+ BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
+ fi
diff --git a/data/python/cross.diff b/data/python/cross.diff
new file mode 100644
index 000000000..8edb2153c
--- /dev/null
+++ b/data/python/cross.diff
@@ -0,0 +1,429 @@
+diff -r -u BuildPython-2.5.1/configure.in Python-2.5.1/configure.in
+--- BuildPython-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
++++ Python-2.5.1/configure.in 2008-01-09 06:54:17.000000000 +0000
+@@ -165,7 +165,7 @@
+ AC_MSG_CHECKING(MACHDEP)
+ if test -z "$MACHDEP"
+ then
+- ac_sys_system=`uname -s`
++ ac_sys_system=Darwin
+ if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
+ -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
+ ac_sys_release=`uname -v`
+@@ -247,6 +247,8 @@
+
+ esac
+
++define_xopen_source=no
++
+ if test $define_xopen_source = yes
+ then
+ # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
+@@ -1420,7 +1422,6 @@
+ echo '+ Continuing in 10 seconds to let you to ponder. +'
+ echo '+ +'
+ echo '====================================================================='
+- sleep 10
+ fi
+ AC_MSG_RESULT($SO)
+ AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
+@@ -1473,7 +1474,7 @@
+ Darwin/*)
+ # Use -undefined dynamic_lookup whenever possible (10.3 and later).
+ # This allows an extension to be used in any Python
+- cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
++ cur_target=10.5
+ if test ${cur_target} '>' 10.2; then
+ cur_target=10.3
+ fi
+@@ -3367,41 +3368,6 @@
+ AC_MSG_RESULT(no)
+ fi
+
+-AC_MSG_CHECKING(for %zd printf() format support)
+-AC_TRY_RUN([#include <stdio.h>
+-#include <stddef.h>
+-#include <string.h>
+-
+-int main()
+-{
+- char buffer[256];
+-
+-#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
+-
+- 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 <sys/socket.h> does not define.),[
+diff -r -u BuildPython-2.5.1/Include/pyport.h Python-2.5.1/Include/pyport.h
+--- BuildPython-2.5.1/Include/pyport.h 2006-10-02 15:24:01.000000000 +0000
++++ Python-2.5.1/Include/pyport.h 2008-01-09 00:19:23.000000000 +0000
+@@ -731,7 +731,7 @@
+ * rather than waiting for integer multiplication to trigger bogus
+ * overflows.
+ */
+-#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
++//#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
+ #endif
+
+ #ifdef __cplusplus
+diff -r -u BuildPython-2.5.1/Modules/_ctypes/cfield.c Python-2.5.1/Modules/_ctypes/cfield.c
+--- BuildPython-2.5.1/Modules/_ctypes/cfield.c 2007-03-22 19:43:37.000000000 +0000
++++ Python-2.5.1/Modules/_ctypes/cfield.c 2008-01-09 06:52:12.000000000 +0000
+@@ -1642,7 +1642,7 @@
+ struct _ffi_type **elements;
+ } ffi_type;
+ */
+-
++#if 0
+ /* align and size are bogus for void, but they must not be zero */
+ ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };
+
+@@ -1664,5 +1664,5 @@
+ /* ffi_type ffi_type_longdouble */
+
+ ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER };
+-
++#endif
+ /*---------------- EOF ----------------*/
+diff -r -u BuildPython-2.5.1/Modules/getaddrinfo.c Python-2.5.1/Modules/getaddrinfo.c
+--- BuildPython-2.5.1/Modules/getaddrinfo.c 2003-08-17 21:28:39.000000000 +0000
++++ Python-2.5.1/Modules/getaddrinfo.c 2008-01-09 06:40:37.000000000 +0000
+@@ -38,7 +38,7 @@
+ * - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag.
+ */
+
+-#if 0
++#if 1
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
+diff -r -u BuildPython-2.5.1/Modules/mmapmodule.c Python-2.5.1/Modules/mmapmodule.c
+--- BuildPython-2.5.1/Modules/mmapmodule.c 2006-08-22 13:57:07.000000000 +0000
++++ Python-2.5.1/Modules/mmapmodule.c 2008-01-09 06:40:01.000000000 +0000
+@@ -36,6 +36,7 @@
+ #ifdef UNIX
+ #include <sys/mman.h>
+ #include <sys/stat.h>
++#include <sys/fcntl.h>
+
+ #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
+ static int
+diff -r -u BuildPython-2.5.1/setup.py Python-2.5.1/setup.py
+--- BuildPython-2.5.1/setup.py 2007-02-14 12:53:41.000000000 +0000
++++ Python-2.5.1/setup.py 2008-01-09 06:48:07.000000000 +0000
+@@ -206,46 +206,16 @@
+ ext_filename = os.path.join(
+ self.build_lib,
+ self.get_ext_filename(self.get_ext_fullname(ext.name)))
+- try:
+- imp.load_dynamic(ext.name, ext_filename)
+- except ImportError, why:
+- 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)')
+- except:
+- exc_type, why, tb = sys.exc_info()
+- self.announce('*** WARNING: importing extension "%s" '
+- 'failed with %s: %s' % (ext.name, exc_type, why),
+- level=3)
+
+ def get_platform(self):
+- # Get value of sys.platform
+- for platform in ['cygwin', 'beos', 'darwin', 'atheos', 'osf1']:
+- if sys.platform.startswith(platform):
+- return platform
+- return sys.platform
++ return 'darwin'
+
+ def detect_modules(self):
++ sysroot = os.getenv('PKG_ROOT')
++
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/local/lib')
++ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/local/include')
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -294,10 +264,10 @@
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+ lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
++ sysroot + '/lib64', sysroot + '/usr/lib64',
++ sysroot + '/lib', sysroot + '/usr/lib',
+ ]
+- inc_dirs = self.compiler.include_dirs + ['/usr/include']
++ inc_dirs = self.compiler.include_dirs + [sysroot + '/usr/include']
+ exts = []
+
+ config_h = sysconfig.get_config_h_filename()
+@@ -476,7 +446,7 @@
+ if find_file('readline/rlconf.h', inc_dirs, []) is None:
+ do_readline = False
+ if do_readline:
+- if sys.platform == 'darwin':
++ if self.get_platform() == 'darwin':
+ # In every directory on the search path search for a dynamic
+ # library and then a static library, instead of first looking
+ # for dynamic libraries on the entiry path.
+@@ -496,11 +466,11 @@
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+ readline_libs.append('curses')
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ [sysroot + '/usr/lib/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=[sysroot + '/usr/lib/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ if platform not in ['mac']:
+@@ -520,20 +490,20 @@
+ depends = ['socketmodule.h']) )
+ # Detect SSL support for the socket module (via _ssl)
+ search_for_ssl_incs_in = [
+- '/usr/local/ssl/include',
+- '/usr/contrib/ssl/include/'
++ sysroot + '/usr/local/ssl/include',
++ sysroot + '/usr/contrib/ssl/include/'
+ ]
+ ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+ search_for_ssl_incs_in
+ )
+ if ssl_incs is not None:
+ krb5_h = find_file('krb5.h', inc_dirs,
+- ['/usr/kerberos/include'])
++ [sysroot + '/usr/kerberos/include'])
+ if krb5_h:
+ ssl_incs += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
++ [sysroot + '/usr/local/ssl/lib',
++ sysroot + '/usr/contrib/ssl/lib/'
+ ] )
+
+ if (ssl_incs is not None and
+@@ -613,30 +583,30 @@
+ # construct a list of paths to look for the header file in on
+ # top of the normal inc_dirs.
+ db_inc_paths = [
+- '/usr/include/db4',
+- '/usr/local/include/db4',
+- '/opt/sfw/include/db4',
+- '/sw/include/db4',
+- '/usr/include/db3',
+- '/usr/local/include/db3',
+- '/opt/sfw/include/db3',
+- '/sw/include/db3',
++ sysroot + '/usr/include/db4',
++ sysroot + '/usr/local/include/db4',
++ sysroot + '/opt/sfw/include/db4',
++ sysroot + '/sw/include/db4',
++ sysroot + '/usr/include/db3',
++ sysroot + '/usr/local/include/db3',
++ sysroot + '/opt/sfw/include/db3',
++ sysroot + '/sw/include/db3',
+ ]
+ # 4.x minor number specific paths
+ for x in (0,1,2,3,4,5):
+- db_inc_paths.append('/usr/include/db4%d' % x)
+- db_inc_paths.append('/usr/include/db4.%d' % x)
+- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
+- db_inc_paths.append('/usr/local/include/db4%d' % x)
+- db_inc_paths.append('/pkg/db-4.%d/include' % x)
+- db_inc_paths.append('/opt/db-4.%d/include' % x)
++ db_inc_paths.append(sysroot + '/usr/include/db4%d' % x)
++ db_inc_paths.append(sysroot + '/usr/include/db4.%d' % x)
++ db_inc_paths.append(sysroot + '/usr/local/BerkeleyDB.4.%d/include' % x)
++ db_inc_paths.append(sysroot + '/usr/local/include/db4%d' % x)
++ db_inc_paths.append(sysroot + '/pkg/db-4.%d/include' % x)
++ db_inc_paths.append(sysroot + '/opt/db-4.%d/include' % x)
+ # 3.x minor number specific paths
+ for x in (3,):
+- db_inc_paths.append('/usr/include/db3%d' % x)
+- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
+- db_inc_paths.append('/usr/local/include/db3%d' % x)
+- db_inc_paths.append('/pkg/db-3.%d/include' % x)
+- db_inc_paths.append('/opt/db-3.%d/include' % x)
++ db_inc_paths.append(sysroot + '/usr/include/db3%d' % x)
++ db_inc_paths.append(sysroot + '/usr/local/BerkeleyDB.3.%d/include' % x)
++ db_inc_paths.append(sysroot + '/usr/local/include/db3%d' % x)
++ db_inc_paths.append(sysroot + '/pkg/db-3.%d/include' % x)
++ db_inc_paths.append(sysroot + '/opt/db-3.%d/include' % x)
+
+ # Add some common subdirectories for Sleepycat DB to the list,
+ # based on the standard include directories. This way DB3/4 gets
+@@ -746,12 +716,12 @@
+ # We hunt for #define SQLITE_VERSION "n.n.n"
+ # We need to find >= sqlite version 3.0.8
+ sqlite_incdir = sqlite_libdir = None
+- sqlite_inc_paths = [ '/usr/include',
+- '/usr/include/sqlite',
+- '/usr/include/sqlite3',
+- '/usr/local/include',
+- '/usr/local/include/sqlite',
+- '/usr/local/include/sqlite3',
++ sqlite_inc_paths = [ sysroot + '/usr/include',
++ sysroot + '/usr/include/sqlite',
++ sysroot + '/usr/include/sqlite3',
++ sysroot + '/usr/local/include',
++ sysroot + '/usr/local/include/sqlite',
++ sysroot + '/usr/local/include/sqlite3',
+ ]
+ MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
+ MIN_SQLITE_VERSION = ".".join([str(x)
+@@ -806,13 +776,13 @@
+ '_sqlite/util.c', ]
+
+ sqlite_defines = []
+- if sys.platform != "win32":
++ if self.get_platform() != "win32":
+ sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
+ else:
+ sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
+
+
+- if sys.platform == 'darwin':
++ if self.get_platform() == 'darwin':
+ # In every directory on the search path search for a dynamic
+ # library and then a static library, instead of first looking
+ # for dynamic libraries on the entiry path.
+@@ -837,7 +807,7 @@
+ # accidentally building this module with a later version of the
+ # underlying db library. May BSD-ish Unixes incorporate db 1.85
+ # symbols into libc and place the include file in /usr/include.
+- f = "/usr/include/db.h"
++ f = sysroot + "/usr/include/db.h"
+ if os.path.exists(f):
+ data = open(f).read()
+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
+@@ -962,7 +932,7 @@
+ break
+ if version >= version_req:
+ if (self.compiler.find_library_file(lib_dirs, 'z')):
+- if sys.platform == "darwin":
++ if self.get_platform() == "darwin":
+ zlib_extra_link_args = ('-Wl,-search_paths_first',)
+ else:
+ zlib_extra_link_args = ()
+@@ -972,7 +942,7 @@
+
+ # Gustavo Niemeyer's bz2 module.
+ if (self.compiler.find_library_file(lib_dirs, 'bz2')):
+- if sys.platform == "darwin":
++ if self.get_platform() == "darwin":
+ bz2_extra_link_args = ('-Wl,-search_paths_first',)
+ else:
+ bz2_extra_link_args = ()
+@@ -1175,7 +1145,7 @@
+ # For 8.4a2, the X11 headers are not included. Rather than include a
+ # complicated search, this is a hard-coded path. It could bail out
+ # if X11 libs are not found...
+- include_dirs.append('/usr/X11R6/include')
++ include_dirs.append(sysroot + '/usr/X11R6/include')
+ frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
+
+ ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
+@@ -1217,7 +1187,7 @@
+ # Check for the include files on Debian and {Free,Open}BSD, where
+ # they're put in /usr/include/{tcl,tk}X.Y
+ dotversion = version
+- if '.' not in dotversion and "bsd" in sys.platform.lower():
++ if '.' not in dotversion and "bsd" in self.get_platform().lower():
+ # OpenBSD and FreeBSD use Tcl/Tk library names like libtcl83.a,
+ # but the include subdirs are named like .../include/tcl8.3.
+ dotversion = dotversion[:-1] + '.' + dotversion[-1]
+@@ -1244,19 +1214,19 @@
+
+ # Check for various platform-specific directories
+ if platform == 'sunos5':
+- include_dirs.append('/usr/openwin/include')
+- added_lib_dirs.append('/usr/openwin/lib')
+- elif os.path.exists('/usr/X11R6/include'):
+- include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib64')
+- added_lib_dirs.append('/usr/X11R6/lib')
+- elif os.path.exists('/usr/X11R5/include'):
+- include_dirs.append('/usr/X11R5/include')
+- added_lib_dirs.append('/usr/X11R5/lib')
++ include_dirs.append(sysroot + '/usr/openwin/include')
++ added_lib_dirs.append(sysroot + '/usr/openwin/lib')
++ elif os.path.exists(sysroot + '/usr/X11R6/include'):
++ include_dirs.append(sysroot + '/usr/X11R6/include')
++ added_lib_dirs.append(sysroot + '/usr/X11R6/lib64')
++ added_lib_dirs.append(sysroot + '/usr/X11R6/lib')
++ elif os.path.exists(sysroot + '/usr/X11R5/include'):
++ include_dirs.append(sysroot + '/usr/X11R5/include')
++ added_lib_dirs.append(sysroot + '/usr/X11R5/lib')
+ else:
+ # Assume default location for X11
+- include_dirs.append('/usr/X11/include')
+- added_lib_dirs.append('/usr/X11/lib')
++ include_dirs.append(sysroot + '/usr/X11/include')
++ added_lib_dirs.append(sysroot + '/usr/X11/lib')
+
+ # If Cygwin, then verify that X is installed before proceeding
+ if platform == 'cygwin':
+@@ -1363,13 +1333,13 @@
+ '_ctypes/malloc_closure.c']
+ depends = ['_ctypes/ctypes.h']
+
+- if sys.platform == 'darwin':
++ if self.get_platform() == 'darwin':
+ sources.append('_ctypes/darwin/dlfcn_simple.c')
+ include_dirs.append('_ctypes/darwin')
+ # XXX Is this still needed?
+ ## extra_link_args.extend(['-read_only_relocs', 'warning'])
+
+- elif sys.platform == 'sunos5':
++ elif self.get_platform() == 'sunos5':
+ # XXX This shouldn't be necessary; it appears that some
+ # of the assembler code is non-PIC (i.e. it has relocations
+ # when it shouldn't. The proper fix would be to rewrite
diff --git a/data/python/distutils.diff b/data/python/distutils.diff
new file mode 100644
index 000000000..dacfdee33
--- /dev/null
+++ b/data/python/distutils.diff
@@ -0,0 +1,115 @@
+diff -ru BuildPython-2.5.1/Lib/distutils/util.py Python-2.5.1/Lib/distutils/util.py
+--- BuildPython-2.5.1/Lib/distutils/util.py 2006-05-23 21:54:23.000000000 +0000
++++ Python-2.5.1/Lib/distutils/util.py 2008-01-09 07:47:28.000000000 +0000
+@@ -13,110 +13,7 @@
+ from distutils import log
+
+ def get_platform ():
+- """Return a string that identifies the current platform. This is used
+- mainly to distinguish platform-specific build directories and
+- platform-specific built distributions. Typically includes the OS name
+- and version and the architecture (as supplied by 'os.uname()'),
+- although the exact information included depends on the OS; eg. for IRIX
+- the architecture isn't particularly important (IRIX only runs on SGI
+- hardware), but for Linux the kernel version isn't particularly
+- important.
+-
+- Examples of returned values:
+- linux-i586
+- linux-alpha (?)
+- solaris-2.6-sun4u
+- irix-5.3
+- irix64-6.2
+-
+- For non-POSIX platforms, currently just returns 'sys.platform'.
+- """
+- if os.name != "posix" or not hasattr(os, 'uname'):
+- # XXX what about the architecture? NT is Intel or Alpha,
+- # Mac OS is M68k or PPC, etc.
+- return sys.platform
+-
+- # Try to distinguish various flavours of Unix
+-
+- (osname, host, release, version, machine) = os.uname()
+-
+- # Convert the OS name to lowercase, remove '/' characters
+- # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
+- osname = string.lower(osname)
+- osname = string.replace(osname, '/', '')
+- machine = string.replace(machine, ' ', '_')
+- machine = string.replace(machine, '/', '-')
+-
+- if osname[:5] == "linux":
+- # At least on Linux/Intel, 'machine' is the processor --
+- # i386, etc.
+- # XXX what about Alpha, SPARC, etc?
+- return "%s-%s" % (osname, machine)
+- elif osname[:5] == "sunos":
+- if release[0] >= "5": # SunOS 5 == Solaris 2
+- osname = "solaris"
+- release = "%d.%s" % (int(release[0]) - 3, release[2:])
+- # fall through to standard osname-release-machine representation
+- elif osname[:4] == "irix": # could be "irix64"!
+- return "%s-%s" % (osname, release)
+- elif osname[:3] == "aix":
+- return "%s-%s.%s" % (osname, version, release)
+- elif osname[:6] == "cygwin":
+- osname = "cygwin"
+- rel_re = re.compile (r'[\d.]+')
+- m = rel_re.match(release)
+- if m:
+- release = m.group()
+- elif osname[:6] == "darwin":
+- #
+- # For our purposes, we'll assume that the system version from
+- # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set
+- # to. This makes the compatibility story a bit more sane because the
+- # machine is going to compile and link as if it were
+- # MACOSX_DEPLOYMENT_TARGET.
+- from distutils.sysconfig import get_config_vars
+- cfgvars = get_config_vars()
+-
+- macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET')
+- if not macver:
+- macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')
+-
+- if not macver:
+- # Get the system version. Reading this plist is a documented
+- # way to get the system version (see the documentation for
+- # the Gestalt Manager)
+- try:
+- f = open('/System/Library/CoreServices/SystemVersion.plist')
+- except IOError:
+- # We're on a plain darwin box, fall back to the default
+- # behaviour.
+- pass
+- else:
+- m = re.search(
+- r'<key>ProductUserVisibleVersion</key>\s*' +
+- r'<string>(.*?)</string>', f.read())
+- f.close()
+- if m is not None:
+- macver = '.'.join(m.group(1).split('.')[:2])
+- # else: fall back to the default behaviour
+-
+- if macver:
+- from distutils.sysconfig import get_config_vars
+- release = macver
+- osname = "macosx"
+-
+-
+- if (release + '.') < '10.4.' and \
+- get_config_vars().get('UNIVERSALSDK', '').strip():
+- # The universal build will build fat binaries, but not on
+- # systems before 10.4
+- machine = 'fat'
+-
+- elif machine in ('PowerPC', 'Power_Macintosh'):
+- # Pick a sane name for the PPC architecture.
+- machine = 'ppc'
+-
+- return "%s-%s-%s" % (osname, release, machine)
++ return 'darwin-10.5-arm'
+
+ # get_platform ()
+
diff --git a/data/python/dylib.diff b/data/python/dylib.diff
new file mode 100644
index 000000000..979925d4a
--- /dev/null
+++ b/data/python/dylib.diff
@@ -0,0 +1,33 @@
+diff -ru Python-2.5.1/Python/dynload_shlib.c Python-2.5.1+iPhone/Python/dynload_shlib.c
+--- Python-2.5.1/Python/dynload_shlib.c 2006-01-04 01:30:17.000000000 +0000
++++ Python-2.5.1+iPhone/Python/dynload_shlib.c 2008-01-09 10:04:49.000000000 +0000
+@@ -40,11 +40,14 @@
+ {".pyd", "rb", C_EXTENSION},
+ {".dll", "rb", C_EXTENSION},
+ #else
+-#ifdef __VMS
++#if defined(__VMS)
+ {".exe", "rb", C_EXTENSION},
+ {".EXE", "rb", C_EXTENSION},
+ {"module.exe", "rb", C_EXTENSION},
+ {"MODULE.EXE", "rb", C_EXTENSION},
++#elif defined(__APPLE__)
++ {".dylib", "rb", C_EXTENSION},
++ {"module.dylib", "rb", C_EXTENSION},
+ #else
+ {".so", "rb", C_EXTENSION},
+ {"module.so", "rb", C_EXTENSION},
+diff -ru Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
+--- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
++++ Python-2.5.1+iPhone/configure.in 2008-01-09 10:27:52.000000000 +0000
+@@ -636,8 +638,8 @@
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ INSTSONAME="$LDLIBRARY".$SOVERSION
+ ;;
+- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+- LDLIBRARY='libpython$(VERSION).so'
++ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Darwin*)
++ LDLIBRARY='libpython$(VERSION)'"${SO-so}"
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ case $ac_sys_system in
diff --git a/data/python/environ.diff b/data/python/environ.diff
new file mode 100644
index 000000000..e42f70ec4
--- /dev/null
+++ b/data/python/environ.diff
@@ -0,0 +1,26 @@
+diff -ru Python-2.5.1/Misc/setuid-prog.c Python-2.5.1+iPhone/Misc/setuid-prog.c
+--- Python-2.5.1/Misc/setuid-prog.c 1998-09-10 20:18:09.000000000 +0000
++++ Python-2.5.1+iPhone/Misc/setuid-prog.c 2008-01-09 14:04:57.000000000 +0000
+@@ -102,9 +102,8 @@
+ clean_environ(void)
+ {
+ char **p;
+- extern char **environ;
+
+- for (p = environ; *p; p++) {
++ for (p = _NSGetEnviron(); *p; p++) {
+ if (strncmp(*p, "LD_", 3) == 0)
+ **p = 'X';
+ else if (strncmp(*p, "_RLD", 4) == 0)
+diff -ru Python-2.5.1/Modules/posixmodule.c Python-2.5.1+iPhone/Modules/posixmodule.c
+--- Python-2.5.1/Modules/posixmodule.c 2007-04-04 18:30:56.000000000 +0000
++++ Python-2.5.1+iPhone/Modules/posixmodule.c 2008-01-09 14:07:59.000000000 +0000
+@@ -339,7 +339,7 @@
+ #endif
+
+ /* Return a dictionary corresponding to the POSIX environment table */
+-#ifdef WITH_NEXT_FRAMEWORK
++#if 1
+ /* On Darwin/MacOSX a shared library or framework has no access to
+ ** environ directly, we must obtain it with _NSGetEnviron().
+ */
diff --git a/data/python/framework.diff b/data/python/framework.diff
new file mode 100644
index 000000000..2593a590c
--- /dev/null
+++ b/data/python/framework.diff
@@ -0,0 +1,28 @@
+diff -r -u Python-2.5.1/Mac/Makefile.in Python-2.5.1+iPhone/Mac/Makefile.in
+--- Python-2.5.1/Mac/Makefile.in 2006-06-11 20:23:29.000000000 +0000
++++ Python-2.5.1+iPhone/Mac/Makefile.in 2008-01-09 11:32:54.000000000 +0000
+@@ -223,7 +223,6 @@
+ done
+
+
+- $(RUNSHARED) $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
+ $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+ $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
+
+diff -r -u Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
+--- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
++++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 11:34:00.000000000 +0000
+@@ -391,8 +391,11 @@
+ -compatibility_version $(VERSION) \
+ -current_version $(VERSION); \
+ else \
+- libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
+- @LIBTOOL_CRUFT@ ;\
++ $(CC) -o $(LDLIBRARY) -arch_only arm -dynamiclib \
++ -all_load $(LIBRARY) -Wl,-single_module \
++ -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
++ -compatibility_version $(VERSION) \
++ -current_version $(VERSION); \
+ fi
+ $(INSTALL) -d -m $(DIRMODE) \
+ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
diff --git a/data/python/make.sh b/data/python/make.sh
new file mode 100644
index 000000000..2dc8c68c6
--- /dev/null
+++ b/data/python/make.sh
@@ -0,0 +1,23 @@
+pkg:extract
+cd *
+./configure --prefix=/usr
+make
+cp -a Parser/pgen{,_}
+cp -a python{,_}
+sleep 10
+pkg:patch
+autoconf
+SO=.dylib CXX=arm-apple-darwin-g++ pkg:configure --enable-shared --with-system-ffi --with-signal-module --disable-toolbox-glue
+make clean
+rm libpython2.5.a
+#make Include/graminit.h Python/graminit.c CC=gcc BASECFLAGS=
+#cp -a Parser/pgen pgen-host
+#make clean
+make python AR=arm-apple-darwin-ar
+sleep 2
+touch python_
+make BUILDPYTHON=python_
+pkg:install BUILDPYTHON=python_
+pkg: rm -f /usr/bin/python{,2.5}
+pkg: cp -fa python /usr/bin/python2.5
+pkg: ln -s python2.5 /usr/bin/python
diff --git a/data/python/modules.diff b/data/python/modules.diff
new file mode 100644
index 000000000..f5b9985b6
--- /dev/null
+++ b/data/python/modules.diff
@@ -0,0 +1,32 @@
+diff -ru Python-2.5.1/setup.py Python-2.5.1+iPhone/setup.py
+--- Python-2.5.1/setup.py 2007-02-14 12:53:41.000000000 +0000
++++ Python-2.5.1+iPhone/setup.py 2008-01-09 12:43:58.000000000 +0000
+@@ -460,8 +430,7 @@
+ # 64-bit platforms.
+ exts.append( Extension('audioop', ['audioop.c']) )
+
+- # Disabled on 64-bit platforms
+- if sys.maxint != 9223372036854775807L:
++ if True:
+ # Operations on images
+ exts.append( Extension('imageop', ['imageop.c']) )
+ # Read SGI RGB image files (but coded portably)
+@@ -606,7 +577,7 @@
+ # a release. Most open source OSes come with one or more
+ # versions of BerkeleyDB already installed.
+
+- max_db_ver = (4, 5)
++ max_db_ver = (4, 6)
+ min_db_ver = (3, 3)
+ db_setup_debug = False # verbose debug prints from this script?
+
+@@ -1025,8 +996,7 @@
+ exts.append(Extension('_codecs_' + loc,
+ ['cjkcodecs/_codecs_%s.c' % loc]))
+
+- # Dynamic loading module
+- if sys.maxint == 0x7fffffff:
++ if True:
+ # This requires sizeof(int) == sizeof(long) == sizeof(char*)
+ dl_inc = find_file('dlfcn.h', [], inc_dirs)
+ if (dl_inc is not None) and (platform not in ['atheos']):
diff --git a/data/python/test.diff b/data/python/test.diff
new file mode 100644
index 000000000..e2258207b
--- /dev/null
+++ b/data/python/test.diff
@@ -0,0 +1,17 @@
+diff -ru Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
+--- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
++++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 08:21:39.000000000 +0000
+@@ -775,11 +775,11 @@
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
++ -x 'bad_coding|badsyntax|site-packages|test' $(DESTDIR)$(LIBDEST)
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
++ -x 'bad_coding|badsyntax|site-packages|test' $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \