rpms/python26/EL-5 Python-2.2.1-pydocnogui.patch, NONE, 1.1 disable-pymalloc-on-valgrind-py26.patch, NONE, 1.1 import.log, NONE, 1.1 libpython.stp, NONE, 1.1 macros.python26, NONE, 1.1 python-2.3.4-lib64-regex.patch, NONE, 1.1 python-2.5-cflags.patch, NONE, 1.1 python-2.5.1-codec-ascii-tolower.patch, NONE, 1.1 python-2.5.1-plural-fix.patch, NONE, 1.1 python-2.5.1-socketmodule-constants.patch, NONE, 1.1 python-2.5.1-socketmodule-constants2.patch, NONE, 1.1 python-2.5.1-sqlite-encoding.patch, NONE, 1.1 python-2.6-ctypes-noexecmem.patch, NONE, 1.1 python-2.6-distutils_rpm.patch, NONE, 1.1 python-2.6-lib64.patch, NONE, 1.1 python-2.6-rpath.patch, NONE, 1.1 python-2.6.2-binutils-no-dep.patch, NONE, 1.1 python-2.6.2-config.patch, NONE, 1.1 python-2.6.2-with-system-expat.patch, NONE, 1.1 python-2.6.4-autotool-intermediates.patch, NONE, 1.1 python-2.6.4-distutils-rpath.patch, NONE, 1.1 python-2.6.4-dtrace.patch, NONE, 1.1 python-2.6.4-expat-version.patch, NONE, 1.1 python-2.6.4-no-static-lib.patch, NONE, 1.1 python26.spec, NONE, 1.1 pythondeps.sh, NONE, 1.1 runtests.sh, NONE, 1.1 systemtap-example.stp, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

dmalcolm dmalcolm at fedoraproject.org
Fri Apr 9 15:06:01 UTC 2010


Author: dmalcolm

Update of /cvs/pkgs/rpms/python26/EL-5
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14003/EL-5

Modified Files:
	.cvsignore sources 
Added Files:
	Python-2.2.1-pydocnogui.patch 
	disable-pymalloc-on-valgrind-py26.patch import.log 
	libpython.stp macros.python26 python-2.3.4-lib64-regex.patch 
	python-2.5-cflags.patch python-2.5.1-codec-ascii-tolower.patch 
	python-2.5.1-plural-fix.patch 
	python-2.5.1-socketmodule-constants.patch 
	python-2.5.1-socketmodule-constants2.patch 
	python-2.5.1-sqlite-encoding.patch 
	python-2.6-ctypes-noexecmem.patch 
	python-2.6-distutils_rpm.patch python-2.6-lib64.patch 
	python-2.6-rpath.patch python-2.6.2-binutils-no-dep.patch 
	python-2.6.2-config.patch python-2.6.2-with-system-expat.patch 
	python-2.6.4-autotool-intermediates.patch 
	python-2.6.4-distutils-rpath.patch python-2.6.4-dtrace.patch 
	python-2.6.4-expat-version.patch 
	python-2.6.4-no-static-lib.patch python26.spec pythondeps.sh 
	runtests.sh systemtap-example.stp 
Log Message:
Initial import, based on review bz:573151


Python-2.2.1-pydocnogui.patch:
 pydoc.py |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

--- NEW FILE Python-2.2.1-pydocnogui.patch ---
--- Python-2.2.1/Lib/pydoc.py.nogui	2002-07-08 18:32:47.000000000 -0400
+++ Python-2.2.1/Lib/pydoc.py	2002-07-08 18:33:37.000000000 -0400
@@ -18,9 +18,6 @@
 Run "pydoc -p <port>" to start an HTTP server on a given port on the
 local machine to generate documentation web pages.
 
-For platforms without a command line, "pydoc -g" starts the HTTP server
-and also pops up a little window for controlling it.
-
 Run "pydoc -w <name>" to write out the HTML documentation for a module
 to a file named "<name>.html".
 """
@@ -2043,9 +2040,6 @@
         writing = 0
 
         for opt, val in opts:
-            if opt == '-g':
-                gui()
-                return
             if opt == '-k':
                 apropos(val)
                 return
@@ -2099,13 +2093,10 @@
 %s -p <port>
     Start an HTTP server on the given port on the local machine.
 
-%s -g
-    Pop up a graphical interface for finding and serving documentation.
-
 %s -w <name> ...
     Write out the HTML documentation for a module to a file in the current
     directory.  If <name> contains a '%s', it is treated as a filename; if
     it names a directory, documentation is written for all the contents.
-""" % (cmd, os.sep, cmd, cmd, cmd, cmd, os.sep)
+""" % (cmd, os.sep, cmd, cmd, cmd, os.sep)
 
  if __name__ == '__main__': cli()

disable-pymalloc-on-valgrind-py26.patch:
 Misc/NEWS          |    5 +++++
 Objects/obmalloc.c |   35 +++++++++++++++++++++++++++++++++++
 configure.in       |   13 +++++++++++++
 pyconfig.h.in      |    3 +++
 4 files changed, 56 insertions(+)

--- NEW FILE disable-pymalloc-on-valgrind-py26.patch ---
Index: configure.in
===================================================================
--- configure.in	(revision 61828)
+++ configure.in	(working copy)
@@ -2232,6 +2232,19 @@ then
 fi
 AC_MSG_RESULT($with_pymalloc)
 
+# Check for Valgrind support
+AC_MSG_CHECKING([for --with-valgrind])
+AC_ARG_WITH([valgrind],
+  AC_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
+  with_valgrind=no)
+AC_MSG_RESULT([$with_valgrind])
+if test "$with_valgrind" != no; then
+    AC_CHECK_HEADER([valgrind/valgrind.h],
+      [AC_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])],
+      [AC_MSG_ERROR([Valgrind support requested but headers not available])]
+    )
+fi
+
 # Check for --with-wctype-functions
 AC_MSG_CHECKING(for --with-wctype-functions)
 AC_ARG_WITH(wctype-functions, 
Index: Objects/obmalloc.c
===================================================================
--- Objects/obmalloc.c	(revision 61828)
+++ Objects/obmalloc.c	(working copy)
@@ -2,6 +2,21 @@
 
 #ifdef WITH_PYMALLOC
 
+#ifdef WITH_VALGRIND
+#include <valgrind/valgrind.h>
+
+/* If we're using GCC, use __builtin_expect() to reduce overhead of
+   the valgrind checks */
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
+#  define UNLIKELY(value) __builtin_expect((value), 0)
+#else
+#  define UNLIKELY(value) (value)
+#endif
+
+/* -1 indicates that we haven't checked that we're running on valgrind yet. */
+static int running_on_valgrind = -1;
+#endif
+
 /* An object allocator for Python.
 
    Here is an introduction to the layers of the Python memory architecture,
@@ -726,6 +741,13 @@ PyObject_Malloc(size_t nbytes)
 	poolp next;
 	uint size;
 
+#ifdef WITH_VALGRIND
+	if (UNLIKELY(running_on_valgrind == -1))
+		running_on_valgrind = RUNNING_ON_VALGRIND;
+	if (UNLIKELY(running_on_valgrind))
+		goto redirect;
+#endif
+
 	/*
 	 * This implicitly redirects malloc(0).
 	 */
@@ -916,6 +938,11 @@ PyObject_Free(void *p)
 	if (p == NULL)	/* free(NULL) has no effect */
 		return;
 
+#ifdef WITH_VALGRIND
+	if (UNLIKELY(running_on_valgrind > 0))
+		goto redirect;
+#endif
+
 	pool = POOL_ADDR(p);
 	if (Py_ADDRESS_IN_RANGE(p, pool)) {
 		/* We allocated this address. */
@@ -1110,6 +1137,7 @@ PyObject_Free(void *p)
 		return;
 	}
 
+redirect:
 	/* We didn't allocate this address. */
 	free(p);
 }
@@ -1130,6 +1158,12 @@ PyObject_Realloc(void *p, size_t nbytes)
 	if (p == NULL)
 		return PyObject_Malloc(nbytes);
 
+#ifdef WITH_VALGRIND
+	/* Treat running_on_valgrind == -1 the same as 0 */
+	if (UNLIKELY(running_on_valgrind > 0))
+		goto redirect;
+#endif
+
 	pool = POOL_ADDR(p);
 	if (Py_ADDRESS_IN_RANGE(p, pool)) {
 		/* We're in charge of this block */
@@ -1157,6 +1191,7 @@ PyObject_Realloc(void *p, size_t nbytes)
 		}
 		return bp;
 	}
+ redirect:
 	/* We're not managing this block.  If nbytes <=
 	 * SMALL_REQUEST_THRESHOLD, it's tempting to try to take over this
 	 * block.  However, if we do, we need to copy the valid data from
Index: Misc/NEWS
===================================================================
--- Misc/NEWS	(revision 61828)
+++ Misc/NEWS	(working copy)
@@ -60,6 +60,11 @@ Core and builtins
 
 - Issue #2143: Fix embedded readline() hang on SSL socket EOF.
 
+- Issue #2422: When compiled with the ``--with-valgrind`` option, the
+  pymalloc allocator will be automatically disabled when running under
+  Valgrind.  This gives improved memory leak detection when running
+  under Valgrind, while taking advantage of pymalloc at other times.
+
 Library
 -------
 
Index: pyconfig.h.in
===================================================================
--- pyconfig.h.in	(revision 61828)
+++ pyconfig.h.in	(working copy)
@@ -958,6 +958,9 @@
 /* Define to profile with the Pentium timestamp counter */
 #undef WITH_TSC
 
+/* Define if you want pymalloc to be disabled when running under valgrind */
+#undef WITH_VALGRIND
+
 
  /* Define to 1 if your processor stores words with the most significant byte
     first (like Motorola and SPARC, unlike Intel and VAX). 


--- NEW FILE import.log ---
python26-2_6_5-3_el5:EL-5:python26-2.6.5-3.el5.src.rpm:1270825450


--- NEW FILE libpython.stp ---
/* Systemtap tapset to make it easier to trace Python */

/*
   Define python.function.entry/return:
*/
probe python.function.entry = process("python").library("LIBRARY_PATH").mark("function__entry")
{
    filename = user_string($arg1);
    funcname = user_string($arg2);
    lineno = $arg3;
}
probe python.function.return = process("python").library("LIBRARY_PATH").mark("function__return")
{
    filename = user_string($arg1);
    funcname = user_string($arg2);
    lineno = $arg3;
}


--- NEW FILE macros.python26 ---
# Provide an alternate definition of __os_install_post
# (normally defined by /usr/lib/rpm/redhat/macros)
#
# This definition is identical to that one, except that in this one
# brp-python-bytecompile is invoked with python2.6 rather than with no
# arguments (which leads to it incorrectly using /usr/bin/python)
%__python26_os_install_post    \
    /usr/lib/rpm/redhat/brp-compress \
    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
    /usr/lib/rpm/brp-python-bytecompile /usr/bin/python2.6 \
    /usr/lib/rpm/redhat/brp-java-repack-jars \
%{nil}

python-2.3.4-lib64-regex.patch:
 test_re.py |    9 +++++++++
 1 file changed, 9 insertions(+)

--- NEW FILE python-2.3.4-lib64-regex.patch ---
--- Python-2.3.4/Lib/test/test_re.py			2004-04-20 23:32:33.000000000 +0200
+++ Python-2.3.4/Lib/test/test_re.py.lib64-regex	2004-05-29 17:36:52.000000000 +0200
@@ -497,6 +497,15 @@
         self.assert_(re.compile('bug_926075') is not
                      re.compile(eval("u'bug_926075'")))
 
+    def test_bug_931848(self):
+        try:
+            unicode
+        except NameError:
+            pass
+        pattern = eval('u"[\u002E\u3002\uFF0E\uFF61]"')
+        self.assertEqual(re.compile(pattern).split("a.b.c"),
+                         ['a','b','c'])
+
 def run_re_tests():
     from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
     if verbose:

python-2.5-cflags.patch:
 Makefile.pre.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE python-2.5-cflags.patch ---
--- Python-2.5c1/Makefile.pre.in.cflags	2006-08-18 11:05:40.000000000 -0400
+++ Python-2.5c1/Makefile.pre.in	2006-08-18 11:09:26.000000000 -0400
@@ -334,7 +334,7 @@
 
 # Build the interpreter
 $(BUILDPYTHON):	Modules/python.o $(LIBRARY) $(LDLIBRARY)
-		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
+		$(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
 			Modules/python.o \
 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
 

python-2.5.1-codec-ascii-tolower.patch:
 codecs.c  |    7 ++++++-
 codecs.c~ |only
 2 files changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE python-2.5.1-codec-ascii-tolower.patch ---
diff -rup Python-2.5.1-orig/Python/codecs.c Python-2.5.1/Python/codecs.c
--- Python-2.5.1-orig/Python/codecs.c	2006-06-23 17:16:18.000000000 -0400
+++ Python-2.5.1/Python/codecs.c	2007-10-30 12:51:10.000000000 -0400
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
     return -1;
 }
 
+/* isupper() forced into the ASCII Locale */
+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
+/* tolower() forced into the ASCII Locale */
+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
+
 /* Convert a string to a normalized Python string: all characters are
    converted to lower case, spaces are replaced with underscores. */
 
@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st
         if (ch == ' ')
             ch = '-';
         else
-            ch = tolower(Py_CHARMASK(ch));
+            ch = ascii_tolower(Py_CHARMASK(ch));
 	p[i] = ch;
     }
     return v;
Only in Python-2.5.1/Python: codecs.c~

python-2.5.1-plural-fix.patch:
 gettext.py |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE python-2.5.1-plural-fix.patch ---
diff -up Python-2.5.1/Lib/gettext.py.plural Python-2.5.1/Lib/gettext.py
--- Python-2.5.1/Lib/gettext.py.plural	2007-09-10 11:38:57.000000000 -0400
+++ Python-2.5.1/Lib/gettext.py	2007-09-10 11:39:00.000000000 -0400
@@ -299,6 +299,8 @@ class GNUTranslations(NullTranslations):
                     item = item.strip()
                     if not item:
                         continue
+                    if item.startswith("#"):
+                        continue
                     if ':' in item:
                         k, v = item.split(':', 1)
                         k = k.strip().lower()

python-2.5.1-socketmodule-constants.patch:
 socketmodule.c |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

--- NEW FILE python-2.5.1-socketmodule-constants.patch ---
--- Python-2.5.1i-orig/Modules/socketmodule.c	2008-03-07 16:38:47.000000000 -0500
+++ Python-2.5.1/Modules/socketmodule.c	2008-03-07 16:41:09.000000000 -0500
@@ -4507,6 +4507,60 @@
 #ifdef	SO_TYPE
 	PyModule_AddIntConstant(m, "SO_TYPE", SO_TYPE);
 #endif
+#ifdef	SO_SNDBUFFORCE
+	PyModule_AddIntConstant(m, "SO_SNDBUFFORCE", SO_SNDBUFFORCE);
+#endif
+#ifdef	SO_RCVBUFFORCE
+	PyModule_AddIntConstant(m, "SO_RCVBUFFORCE", SO_RCVBUFFORCE);
+#endif
+#ifdef	SO_NO_CHECK
+	PyModule_AddIntConstant(m, "SO_NO_CHECK", SO_NO_CHECK);
+#endif
+#ifdef	SO_PRIORITY
+	PyModule_AddIntConstant(m, "SO_PRIORITY", SO_PRIORITY);
+#endif
+#ifdef	SO_BSDCOMPAT
+	PyModule_AddIntConstant(m, "SO_BSDCOMPAT", SO_BSDCOMPAT);
+#endif
+#ifdef	SO_PASSCRED
+	PyModule_AddIntConstant(m, "SO_PASSCRED", SO_PASSCRED);
+#endif
+#ifdef	SO_PEERCRED
+	PyModule_AddIntConstant(m, "SO_PEERCRED", SO_PEERCRED);
+#endif
+#ifdef	SO_SECURITY_AUTHENTICATION
+	PyModule_AddIntConstant(m, "SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
+#endif
+#ifdef	SO_SECURITY_ENCRYPTION_TRANSPORT
+	PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
+#endif
+#ifdef	SO_SECURITY_ENCRYPTION_NETWORK
+	PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
+#endif
+#ifdef	SO_BINDTODEVICE
+	PyModule_AddIntConstant(m, "SO_BINDTODEVICE", SO_BINDTODEVICE);
+#endif
+#ifdef	SO_ATTACH_FILTER
+	PyModule_AddIntConstant(m, "SO_ATTACH_FILTER", SO_ATTACH_FILTER);
+#endif
+#ifdef	SO_DETACH_FILTER
+	PyModule_AddIntConstant(m, "SO_DETACH_FILTER", SO_DETACH_FILTER);
+#endif
+#ifdef	SO_PEERNAME
+	PyModule_AddIntConstant(m, "SO_PEERNAME", SO_PEERNAME);
+#endif
+#ifdef	SO_TIMESTAMP
+	PyModule_AddIntConstant(m, "SO_TIMESTAMP", SO_TIMESTAMP);
+#endif
+#ifdef	SO_PEERSEC
+	PyModule_AddIntConstant(m, "SO_PEERSEC", SO_PEERSEC);
+#endif
+#ifdef	SO_PASSSEC
+	PyModule_AddIntConstant(m, "SO_PASSSEC", SO_PASSSEC);
+#endif
+#ifdef	SO_TIMESTAMPNS
+	PyModule_AddIntConstant(m, "SO_TIMESTAMPNS", SO_TIMESTAMPNS);
+#endif
 
 	/* Maximum number of connections for "listen" */
 #ifdef	SOMAXCONN

python-2.5.1-socketmodule-constants2.patch:
 socketmodule.c  |    9 +++++++++
 socketmodule.c~ |only
 2 files changed, 9 insertions(+)

--- NEW FILE python-2.5.1-socketmodule-constants2.patch ---
diff -rup Python-2.5.1-orig/Modules/socketmodule.c Python-2.5.1/Modules/socketmodule.c
--- Python-2.5.1-orig/Modules/socketmodule.c	2008-03-25 09:59:38.000000000 -0400
+++ Python-2.5.1/Modules/socketmodule.c	2008-03-25 10:12:24.000000000 -0400
@@ -4977,6 +4977,15 @@ init_socket(void)
 #ifdef	TCP_QUICKACK
 	PyModule_AddIntConstant(m, "TCP_QUICKACK", TCP_QUICKACK);
 #endif
+#ifdef	TCP_CONGESTION
+	PyModule_AddIntConstant(m, "TCP_CONGESTION", TCP_CONGESTION);
+#endif
+#ifdef	TCP_MD5SIG
+	PyModule_AddIntConstant(m, "TCP_MD5SIG", TCP_MD5SIG);
+#endif
+#ifdef	TCP_MD5SIG_MAXKEYLEN
+	PyModule_AddIntConstant(m, "TCP_MD5SIG_MAXKEYLEN", TCP_MD5SIG_MAXKEYLEN);
+#endif
 
 
 	/* IPX options */
Only in Python-2.5.1/Modules: socketmodule.c~

python-2.5.1-sqlite-encoding.patch:
 __init__.py |    3 +--
 dbapi2.py   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

--- NEW FILE python-2.5.1-sqlite-encoding.patch ---
diff -up Python-2.5.1/Lib/sqlite3/dbapi2.py.encoding Python-2.5.1/Lib/sqlite3/dbapi2.py
--- Python-2.5.1/Lib/sqlite3/dbapi2.py.encoding	2007-09-14 10:41:50.000000000 -0400
+++ Python-2.5.1/Lib/sqlite3/dbapi2.py	2007-09-14 10:42:00.000000000 -0400
@@ -1,7 +1,6 @@
-#-*- coding: ISO-8859-1 -*-
 # pysqlite2/dbapi2.py: the DB-API 2.0 interface
 #
-# Copyright (C) 2004-2005 Gerhard Häring <gh at ghaering.de>
+# Copyright (C) 2004-2005 Gerhard Haering <gh at ghaering.de>
 #
 # This file is part of pysqlite.
 #
diff -up Python-2.5.1/Lib/sqlite3/__init__.py.encoding Python-2.5.1/Lib/sqlite3/__init__.py
--- Python-2.5.1/Lib/sqlite3/__init__.py.encoding	2007-09-14 10:41:47.000000000 -0400
+++ Python-2.5.1/Lib/sqlite3/__init__.py	2007-09-14 10:42:06.000000000 -0400
@@ -1,7 +1,6 @@
-#-*- coding: ISO-8859-1 -*-
 # pysqlite2/__init__.py: the pysqlite2 package.
 #
-# Copyright (C) 2005 Gerhard Häring <gh at ghaering.de>
+# Copyright (C) 2005 Gerhard Haering <gh at ghaering.de>
 #
 # This file is part of pysqlite.
 #

python-2.6-ctypes-noexecmem.patch:
 Modules/_ctypes/_ctypes.c   |    2 +-
 Modules/_ctypes/callbacks.c |   16 ++++++++++------
 Modules/_ctypes/ctypes.h    |    3 ++-
 setup.py                    |    3 +--
 4 files changed, 14 insertions(+), 10 deletions(-)

--- NEW FILE python-2.6-ctypes-noexecmem.patch ---
diff -ur Python-2.6~/Modules/_ctypes/callbacks.c Python-2.6/Modules/_ctypes/callbacks.c
--- Python-2.6~/Modules/_ctypes/callbacks.c	2008-06-09 00:58:54.000000000 -0400
+++ Python-2.6/Modules/_ctypes/callbacks.c	2009-03-17 00:08:38.424528546 -0400
@@ -21,8 +21,8 @@
 	Py_XDECREF(self->converters);
 	Py_XDECREF(self->callable);
 	Py_XDECREF(self->restype);
-	if (self->pcl)
-		FreeClosure(self->pcl);
+	if (self->pcl_write)
+		ffi_closure_free(self->pcl_write);
 	PyObject_GC_Del(self);
 }
 
@@ -373,7 +373,8 @@
 		return NULL;
 	}
 
-	p->pcl = NULL;
+	p->pcl_exec = NULL;
+	p->pcl_write = NULL;
 	memset(&p->cif, 0, sizeof(p->cif));
 	p->converters = NULL;
 	p->callable = NULL;
@@ -402,8 +403,9 @@
 
 	assert(CThunk_CheckExact(p));
 
-	p->pcl = MallocClosure();
-	if (p->pcl == NULL) {
+	p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
+					 &p->pcl_exec);
+	if (p->pcl_write == NULL) {
 		PyErr_NoMemory();
 		goto error;
 	}
@@ -448,7 +450,9 @@
 			     "ffi_prep_cif failed with %d", result);
 		goto error;
 	}
-	result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
+	result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
+				      p,
+				      p->pcl_exec);
 	if (result != FFI_OK) {
 		PyErr_Format(PyExc_RuntimeError,
 			     "ffi_prep_closure failed with %d", result);
diff -ur Python-2.6~/Modules/_ctypes/_ctypes.c Python-2.6/Modules/_ctypes/_ctypes.c
--- Python-2.6~/Modules/_ctypes/_ctypes.c	2008-08-19 15:40:23.000000000 -0400
+++ Python-2.6/Modules/_ctypes/_ctypes.c	2009-03-17 00:08:38.479530502 -0400
@@ -3438,7 +3438,7 @@
 	self->callable = callable;
 
 	self->thunk = thunk;
-	*(void **)self->b_ptr = (void *)thunk->pcl;
+	*(void **)self->b_ptr = (void *)thunk->pcl_exec;
 	
 	Py_INCREF((PyObject *)thunk); /* for KeepRef */
 	if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) {
diff -ur Python-2.6~/Modules/_ctypes/ctypes.h Python-2.6/Modules/_ctypes/ctypes.h
--- Python-2.6~/Modules/_ctypes/ctypes.h	2008-07-24 07:16:45.000000000 -0400
+++ Python-2.6/Modules/_ctypes/ctypes.h	2009-03-17 00:08:38.480528344 -0400
@@ -95,7 +95,8 @@
 
 typedef struct {
 	PyObject_VAR_HEAD
-	ffi_closure *pcl; /* the C callable */
+	ffi_closure *pcl_write; /* the C callable, writeable */
+	void *pcl_exec;         /* the C callable, executable */
 	ffi_cif cif;
 	int flags;
 	PyObject *converters;
diff -ur Python-2.6~/setup.py Python-2.6/setup.py
--- Python-2.6~/setup.py	2009-03-17 00:07:54.771651851 -0400
+++ Python-2.6/setup.py	2009-03-17 00:08:19.792558478 -0400
@@ -1701,8 +1701,7 @@
                    '_ctypes/callbacks.c',
                    '_ctypes/callproc.c',
                    '_ctypes/stgdict.c',
-                   '_ctypes/cfield.c',
-                   '_ctypes/malloc_closure.c']
+                   '_ctypes/cfield.c']
         depends = ['_ctypes/ctypes.h']
 
         if sys.platform == 'darwin':

python-2.6-distutils_rpm.patch:
 bdist_rpm.py  |    1 +
 bdist_rpm.py~ |only
 2 files changed, 1 insertion(+)

--- NEW FILE python-2.6-distutils_rpm.patch ---
diff -ru Python-2.6-orig/Lib/distutils/command/bdist_rpm.py Python-2.6/Lib/distutils/command/bdist_rpm.py
--- Python-2.6-orig/Lib/distutils/command/bdist_rpm.py	2008-02-23 12:40:11.000000000 -0500
+++ Python-2.6/Lib/distutils/command/bdist_rpm.py	2009-01-06 15:02:18.000000000 -0500
@@ -493,6 +493,7 @@
             ('build', 'build_script', def_build),
             ('install', 'install_script',
              ("%s install "
+              "-O1 "
               "--root=$RPM_BUILD_ROOT "
               "--record=INSTALLED_FILES") % def_setup_call),
             ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"),
Only in Python-2.6/Lib/distutils/command: bdist_rpm.py~

python-2.6-lib64.patch:
 Lib/distutils/command/install.py |    4 ++--
 Lib/distutils/sysconfig.py       |    6 +++++-
 Lib/site.py                      |    4 ++++
 Makefile.pre.in                  |    4 ++--
 Modules/Setup.dist               |    4 ++--
 Modules/getpath.c                |   10 +++++-----
 setup.py                         |   10 +++++-----
 7 files changed, 25 insertions(+), 17 deletions(-)

--- NEW FILE python-2.6-lib64.patch ---
diff -up Python-2.6/Lib/distutils/command/install.py.lib64 Python-2.6/Lib/distutils/command/install.py
--- Python-2.6/Lib/distutils/command/install.py.lib64	2008-05-06 18:41:46.000000000 -0400
+++ Python-2.6/Lib/distutils/command/install.py	2008-11-24 02:34:04.000000000 -0500
@@ -42,14 +42,14 @@ else:
 INSTALL_SCHEMES = {
     'unix_prefix': {
         'purelib': '$base/lib/python$py_version_short/site-packages',
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
         'headers': '$base/include/python$py_version_short/$dist_name',
         'scripts': '$base/bin',
         'data'   : '$base',
         },
     'unix_home': {
         'purelib': '$base/lib/python',
-        'platlib': '$base/lib/python',
+        'platlib': '$base/lib64/python',
         'headers': '$base/include/python/$dist_name',
         'scripts': '$base/bin',
         'data'   : '$base',
diff -up Python-2.6/Lib/distutils/sysconfig.py.lib64 Python-2.6/Lib/distutils/sysconfig.py
--- Python-2.6/Lib/distutils/sysconfig.py.lib64	2008-06-05 08:58:24.000000000 -0400
+++ Python-2.6/Lib/distutils/sysconfig.py	2008-11-24 02:34:04.000000000 -0500
@@ -115,8 +115,12 @@ def get_python_lib(plat_specific=0, stan
         prefix = plat_specific and EXEC_PREFIX or PREFIX
 
     if os.name == "posix":
+        if plat_specific or standard_lib:
+            lib = "lib64"
+        else:
+            lib = "lib"
         libpython = os.path.join(prefix,
-                                 "lib", "python" + get_python_version())
+                                 lib, "python" + get_python_version())
         if standard_lib:
             return libpython
         else:
diff -up Python-2.6/Lib/site.py.lib64 Python-2.6/Lib/site.py
--- Python-2.6/Lib/site.py.lib64	2008-05-10 13:36:24.000000000 -0400
+++ Python-2.6/Lib/site.py	2008-11-24 02:35:51.000000000 -0500
@@ -265,12 +265,16 @@ def addsitepackages(known_paths):
         if sys.platform in ('os2emx', 'riscos'):
             sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
         elif os.sep == '/':
+            sitedirs.append(os.path.join(prefix, "lib64",
+                                        "python" + sys.version[:3],
+                                        "site-packages"))
             sitedirs.append(os.path.join(prefix, "lib",
                                         "python" + sys.version[:3],
                                         "site-packages"))
             sitedirs.append(os.path.join(prefix, "lib", "site-python"))
         else:
             sitedirs.append(prefix)
+            sitedirs.append(os.path.join(prefix, "lib64", "site-packages"))
             sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
 
         if sys.platform == "darwin":
diff -up Python-2.6/Makefile.pre.in.lib64 Python-2.6/Makefile.pre.in
--- Python-2.6/Makefile.pre.in.lib64	2008-11-24 02:34:04.000000000 -0500
+++ Python-2.6/Makefile.pre.in	2008-11-24 02:34:04.000000000 -0500
@@ -87,11 +87,11 @@ datarootdir=    @datarootdir@
 
 # Expanded directories
 BINDIR=		$(exec_prefix)/bin
-LIBDIR=		$(exec_prefix)/lib
+LIBDIR=		$(exec_prefix)/lib64
 MANDIR=		@mandir@
 INCLUDEDIR=	@includedir@
 CONFINCLUDEDIR=	$(exec_prefix)/include
-SCRIPTDIR=	$(prefix)/lib
+SCRIPTDIR=	$(prefix)/lib64
 
 # Detailed destination directories
 BINLIBDEST=	$(LIBDIR)/python$(VERSION)
diff -up Python-2.6/Modules/getpath.c.lib64 Python-2.6/Modules/getpath.c
--- Python-2.6/Modules/getpath.c.lib64	2007-03-10 02:38:14.000000000 -0500
+++ Python-2.6/Modules/getpath.c	2008-11-24 02:34:04.000000000 -0500
@@ -117,8 +117,8 @@
 #endif
 
 #ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
+              EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
 #endif
 
 #ifndef LANDMARK
@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
 static char exec_prefix[MAXPATHLEN+1];
 static char progpath[MAXPATHLEN+1];
 static char *module_search_path = NULL;
-static char lib_python[] = "lib/python" VERSION;
+static char lib_python[] = "lib64/python" VERSION;
 
 static void
 reduce(char *dir)
@@ -524,7 +524,7 @@ calculate_path(void)
     }
     else
         strncpy(zip_path, PREFIX, MAXPATHLEN);
-    joinpath(zip_path, "lib/python00.zip");
+    joinpath(zip_path, "lib64/python00.zip");
     bufsz = strlen(zip_path);	/* Replace "00" with version */
     zip_path[bufsz - 6] = VERSION[0];
     zip_path[bufsz - 5] = VERSION[2];
@@ -534,7 +534,7 @@ calculate_path(void)
             fprintf(stderr,
                 "Could not find platform dependent libraries <exec_prefix>\n");
         strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
-        joinpath(exec_prefix, "lib/lib-dynload");
+        joinpath(exec_prefix, "lib64/lib-dynload");
     }
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
 
diff -up Python-2.6/Modules/Setup.dist.lib64 Python-2.6/Modules/Setup.dist
--- Python-2.6/Modules/Setup.dist.lib64	2008-11-24 02:34:04.000000000 -0500
+++ Python-2.6/Modules/Setup.dist	2008-11-24 02:34:04.000000000 -0500
@@ -408,7 +408,7 @@ gdbm gdbmmodule.c -I/usr/local/include -
 # and the subdirectory of PORT where you built it.
 DBLIBVER=4.7
 DBINC=/usr/include/db4
-DBLIB=/usr/lib
+DBLIB=/usr/lib64
 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
 
 # Historical Berkeley DB 1.85
@@ -454,7 +454,7 @@ cPickle cPickle.c
 # Andrew Kuchling's zlib module.
 # This require zlib 1.1.3 (or later).
 # See http://www.gzip.org/zlib/
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
 
 # Interface to the Expat XML parser
 #
diff -up Python-2.6/setup.py.lib64 Python-2.6/setup.py
--- Python-2.6/setup.py.lib64	2008-11-24 02:34:04.000000000 -0500
+++ Python-2.6/setup.py	2008-11-24 02:34:04.000000000 -0500
@@ -310,7 +310,7 @@ class PyBuildExt(build_ext):
 
     def detect_modules(self):
         # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
         add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
 
         # Add paths specified in the environment variables LDFLAGS and
@@ -583,11 +583,11 @@ class PyBuildExt(build_ext):
             elif self.compiler.find_library_file(lib_dirs, 'curses'):
                 readline_libs.append('curses')
             elif self.compiler.find_library_file(lib_dirs +
-                                               ['/usr/lib/termcap'],
+                                               ['/usr/lib64/termcap'],
                                                'termcap'):
                 readline_libs.append('termcap')
             exts.append( Extension('readline', ['readline.c'],
-                                   library_dirs=['/usr/lib/termcap'],
+                                   library_dirs=['/usr/lib64/termcap'],
                                    extra_link_args=readline_extra_link_args,
                                    libraries=readline_libs) )
         else:
@@ -624,8 +624,8 @@ class PyBuildExt(build_ext):
             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/'
+                                     ['/usr/local/ssl/lib64',
+                                      '/usr/contrib/ssl/lib64/'
                                      ] )
 
         if (ssl_incs is not None and

python-2.6-rpath.patch:
 configure.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE python-2.6-rpath.patch ---
diff -up Python-2.6/configure.in.rpath Python-2.6/configure.in
--- Python-2.6/configure.in.rpath	2008-11-24 02:51:06.000000000 -0500
+++ Python-2.6/configure.in	2008-11-24 02:51:21.000000000 -0500
@@ -729,7 +729,7 @@ if test $enable_shared = "yes"; then
 	  ;;
     OSF*)
 	  LDLIBRARY='libpython$(VERSION).so'
-	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
+	  BLDLIBRARY='-L. -lpython$(VERSION)'
 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
 	  ;;
     atheos*)

python-2.6.2-binutils-no-dep.patch:
 util.py  |    4 +++-
 util.py~ |only
 2 files changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE python-2.6.2-binutils-no-dep.patch ---
diff -ru Python-2.6.2-orig/Lib/ctypes/util.py Python-2.6.2/Lib/ctypes/util.py
--- Python-2.6.2-orig/Lib/ctypes/util.py	2009-01-10 12:11:11.000000000 -0500
+++ Python-2.6.2/Lib/ctypes/util.py	2009-07-30 15:17:39.000000000 -0400
@@ -133,7 +133,9 @@
             dump = f.read()
             rv = f.close()
             if rv == 10:
-                raise OSError, 'objdump command not found'
+                return os.path.basename(f) #  This is good for GLibc, I think,
+                                           # and a dep on binutils is big (for
+                                           # live CDs).
             res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
             if not res:
                 return None
Only in Python-2.6.2/Lib/ctypes: util.py~

python-2.6.2-config.patch:
 Setup.dist |  125 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 62 insertions(+), 63 deletions(-)

--- NEW FILE python-2.6.2-config.patch ---
diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dist
--- Python-2.6.2/Modules/Setup.dist.rhconfig	2008-11-27 05:15:12.000000000 -0500
+++ Python-2.6.2/Modules/Setup.dist	2010-01-25 21:11:01.508867242 -0500
@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear
 # modules are to be built as shared libraries (see above for more
 # detail; also note that *static* reverses this effect):
 
-#*shared*
+*shared*
 
 # GNU readline.  Unlike previous Python incarnations, GNU readline is
 # now incorporated in an optional module, configured in the Setup file
@@ -162,74 +162,74 @@ GLHACK=-Dclear=__GLclear
 # it, depending on your system -- see the GNU readline instructions.
 # It's okay for this to be a shared library, too.
 
-#readline readline.c -lreadline -ltermcap
+readline readline.c -lreadline -ltermcap
 
 
 # Modules that should always be present (non UNIX dependent):
 
-#array arraymodule.c	# array objects
-#cmath cmathmodule.c # -lm # complex math library functions
-#math mathmodule.c # -lm # math library functions, e.g. sin()
-#_struct _struct.c	# binary structure packing/unpacking
-#time timemodule.c # -lm # time operations and variables
-#operator operator.c	# operator.add() and similar goodies
-#_weakref _weakref.c	# basic weak reference support
-#_testcapi _testcapimodule.c    # Python C API test module
-#_random _randommodule.c	# Random number generator
-#_collections _collectionsmodule.c # Container types
-#itertools itertoolsmodule.c	# Functions creating iterators for efficient looping 
-#strop stropmodule.c		# String manipulations
-#_functools _functoolsmodule.c	# Tools for working with functions and callable objects
+array arraymodule.c	# array objects
+cmath cmathmodule.c # -lm # complex math library functions
+math mathmodule.c # -lm # math library functions, e.g. sin()
+_struct _struct.c	# binary structure packing/unpacking
+time timemodule.c # -lm # time operations and variables
+operator operator.c	# operator.add() and similar goodies
+_weakref _weakref.c	# basic weak reference support
+_testcapi _testcapimodule.c    # Python C API test module
+_random _randommodule.c	# Random number generator
+_collections _collectionsmodule.c # Container types
+itertools itertoolsmodule.c	# Functions creating iterators for efficient looping 
+strop stropmodule.c		# String manipulations
+_functools _functoolsmodule.c	# Tools for working with functions and callable objects
 #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c	# elementtree accelerator
 #_pickle _pickle.c	# pickle accelerator
 #datetime datetimemodule.c	# date/time type
-#_bisect _bisectmodule.c	# Bisection algorithms
+_bisect _bisectmodule.c	# Bisection algorithms
 
-#unicodedata unicodedata.c    # static Unicode character database
+unicodedata unicodedata.c    # static Unicode character database
 
 # access to ISO C locale support
-#_locale _localemodule.c  # -lintl
+_locale _localemodule.c  # -lintl
 
 
 # Modules with some UNIX dependencies -- on by default:
 # (If you have a really backward UNIX, select and socket may not be
 # supported...)
 
-#fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
-#spwd spwdmodule.c		# spwd(3) 
-#grp grpmodule.c		# grp(3)
-#select selectmodule.c	# select(2); not on ancient System V
+fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
+spwd spwdmodule.c		# spwd(3) 
+grp grpmodule.c		# grp(3)
+select selectmodule.c	# select(2); not on ancient System V
 
 # Memory-mapped files (also works on Win32).
-#mmap mmapmodule.c
+mmap mmapmodule.c
 
 # CSV file helper
-#_csv _csv.c
+_csv _csv.c
 
 # Socket module helper for socket(2)
-#_socket socketmodule.c
+_socket socketmodule.c
 
 # Socket module helper for SSL support; you must comment out the other
 # socket line above, and possibly edit the SSL variable:
 #SSL=/usr/local/ssl
-#_ssl _ssl.c \
-#	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-#	-L$(SSL)/lib -lssl -lcrypto
+_ssl _ssl.c \
+	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
+	-L$(SSL)/lib -lssl -lcrypto
 
 # The crypt module is now disabled by default because it breaks builds
 # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
 #
 # First, look at Setup.config; configure may have set this for you.
 
-#crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
+crypt cryptmodule.c -lcrypt	# crypt(3); needs -lcrypt on some systems
 
 
 # Some more UNIX dependent modules -- off by default, since these
 # are not supported by all UNIX systems:
 
-#nis nismodule.c -lnsl	# Sun yellow pages -- not everywhere
-#termios termios.c	# Steen Lumholt's termios module
-#resource resource.c	# Jeremy Hylton's rlimit interface
+nis nismodule.c -lnsl	# Sun yellow pages -- not everywhere
+termios termios.c	# Steen Lumholt's termios module
+resource resource.c	# Jeremy Hylton's rlimit interface
 
 
 # Multimedia modules -- off by default.
@@ -237,8 +237,8 @@ GLHACK=-Dclear=__GLclear
 # #993173 says audioop works on 64-bit platforms, though.
 # These represent audio samples or images as strings:
 
-#audioop audioop.c	# Operations on audio samples
-#imageop imageop.c	# Operations on images
+audioop audioop.c	# Operations on audio samples
+imageop imageop.c	# Operations on images
 
 
 # Note that the _md5 and _sha modules are normally only built if the
@@ -248,14 +248,14 @@ GLHACK=-Dclear=__GLclear
 # Message-Digest Algorithm, described in RFC 1321.  The necessary files
 # md5.c and md5.h are included here.
 
-#_md5 md5module.c md5.c
+_md5 md5module.c md5.c
 
 
 # The _sha module implements the SHA checksum algorithms.
 # (NIST's Secure Hash Algorithms.)
-#_sha shamodule.c
-#_sha256 sha256module.c
-#_sha512 sha512module.c
+_sha shamodule.c
+_sha256 sha256module.c
+_sha512 sha512module.c
 
 
 # SGI IRIX specific modules -- off by default.
@@ -302,12 +302,12 @@ GLHACK=-Dclear=__GLclear
 # A Linux specific module -- off by default; this may also work on 
 # some *BSDs.
 
-#linuxaudiodev linuxaudiodev.c
+linuxaudiodev linuxaudiodev.c
 
 
 # George Neville-Neil's timing module:
 
-#timing timingmodule.c
+timing timingmodule.c
 
 
 # The _tkinter module.
@@ -322,7 +322,7 @@ GLHACK=-Dclear=__GLclear
 # every system.
 
 # *** Always uncomment this (leave the leading underscore in!):
-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
 # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
 #	-L/usr/local/lib \
 # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
@@ -332,7 +332,7 @@ GLHACK=-Dclear=__GLclear
 # *** Or uncomment this for Solaris:
 #	-I/usr/openwin/include \
 # *** Uncomment and edit for Tix extension only:
-#	-DWITH_TIX -ltix8.1.8.2 \
+	-DWITH_TIX -ltix \
 # *** Uncomment and edit for BLT extension only:
 #	-DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
 # *** Uncomment and edit for PIL (TkImaging) extension only:
@@ -341,7 +341,7 @@ GLHACK=-Dclear=__GLclear
 # *** Uncomment and edit for TOGL extension only:
 #	-DWITH_TOGL togl.c \
 # *** Uncomment and edit to reflect your Tcl/Tk versions:
-#	-ltk8.2 -ltcl8.2 \
+	-ltk -ltcl \
 # *** Uncomment and edit to reflect where your X11 libraries are:
 #	-L/usr/X11R6/lib \
 # *** Or uncomment this for Solaris:
@@ -351,7 +351,7 @@ GLHACK=-Dclear=__GLclear
 # *** Uncomment for AIX:
 #	-lld \
 # *** Always uncomment this; X11 libraries to link with:
-#	-lX11
+	-lX11
 
 # Lance Ellinghaus's syslog module
 #syslog syslogmodule.c		# syslog daemon interface
@@ -373,7 +373,7 @@ GLHACK=-Dclear=__GLclear
 # it is a highly experimental and dangerous device for calling
 # *arbitrary* C functions in *arbitrary* shared libraries:
 
-#dl dlmodule.c
+dl dlmodule.c
 
 
 # Modules that provide persistent dictionary-like semantics.  You will
@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear
 #
 # First, look at Setup.config; configure may have set this for you.
 
-#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
+gdbm gdbmmodule.c -lgdbm
 
 
 # Sleepycat Berkeley DB interface.
@@ -411,11 +411,10 @@ GLHACK=-Dclear=__GLclear
 #
 # Edit the variables DB and DBLIBVERto point to the db top directory
 # and the subdirectory of PORT where you built it.
-#DB=/usr/local/BerkeleyDB.4.0
-#DBLIBVER=4.0
-#DBINC=$(DB)/include
-#DBLIB=$(DB)/lib
-#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+DBLIBVER=4.3
+DBINC=/usr/include/db4
+DBLIB=/usr/lib
+_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
 
 # Historical Berkeley DB 1.85
 #
@@ -430,14 +429,14 @@ GLHACK=-Dclear=__GLclear
 
 
 # Helper module for various ascii-encoders
-#binascii binascii.c
+binascii binascii.c
 
 # Fred Drake's interface to the Python parser
-#parser parsermodule.c
+parser parsermodule.c
 
 # cStringIO and cPickle
-#cStringIO cStringIO.c
-#cPickle cPickle.c
+cStringIO cStringIO.c
+cPickle cPickle.c
 
 
 # Lee Busby's SIGFPE modules.
@@ -460,7 +459,7 @@ GLHACK=-Dclear=__GLclear
 # Andrew Kuchling's zlib module.
 # This require zlib 1.1.3 (or later).
 # See http://www.gzip.org/zlib/
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
 
 # Interface to the Expat XML parser
 #
@@ -479,14 +478,14 @@ GLHACK=-Dclear=__GLclear
 # Hye-Shik Chang's CJKCodecs
 
 # multibytecodec is required for all the other CJK codec modules
-#_multibytecodec cjkcodecs/multibytecodec.c
+_multibytecodec cjkcodecs/multibytecodec.c
 
-#_codecs_cn cjkcodecs/_codecs_cn.c
-#_codecs_hk cjkcodecs/_codecs_hk.c
-#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
-#_codecs_jp cjkcodecs/_codecs_jp.c
-#_codecs_kr cjkcodecs/_codecs_kr.c
-#_codecs_tw cjkcodecs/_codecs_tw.c
+_codecs_cn cjkcodecs/_codecs_cn.c
+_codecs_hk cjkcodecs/_codecs_hk.c
+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
+_codecs_jp cjkcodecs/_codecs_jp.c
+_codecs_kr cjkcodecs/_codecs_kr.c
+_codecs_tw cjkcodecs/_codecs_tw.c
 
 # Example -- included for reference only:
 # xx xxmodule.c

python-2.6.2-with-system-expat.patch:
 configure.in |    7 +++++++
 setup.py     |   30 +++++++++++++++++++-----------
 2 files changed, 26 insertions(+), 11 deletions(-)

--- NEW FILE python-2.6.2-with-system-expat.patch ---
diff -up Python-2.6.2/configure.in.expat Python-2.6.2/configure.in
--- Python-2.6.2/configure.in.expat	2010-01-25 21:46:42.700858981 -0500
+++ Python-2.6.2/configure.in	2010-01-25 21:46:54.710857387 -0500
@@ -1898,6 +1898,13 @@ LIBS="$withval $LIBS"
 ],
 [AC_MSG_RESULT(no)])
 
+# Check for use of the system expat library
+AC_MSG_CHECKING(for --with-system-expat)
+AC_ARG_WITH(system_expat,
+            AC_HELP_STRING(--with-system-expat, build pyexpat module using an installed expat library))
+
+AC_MSG_RESULT($with_system_expat)
+
 # Check for use of the system libffi library
 AC_MSG_CHECKING(for --with-system-ffi)
 AC_ARG_WITH(system_ffi,
diff -up Python-2.6.2/setup.py.expat Python-2.6.2/setup.py
--- Python-2.6.2/setup.py.expat	2010-01-25 21:46:48.490911125 -0500
+++ Python-2.6.2/setup.py	2010-01-25 21:46:54.711857933 -0500
@@ -1196,19 +1196,26 @@ class PyBuildExt(build_ext):
         #
         # More information on Expat can be found at www.libexpat.org.
         #
-        expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
-        define_macros = [
-            ('HAVE_EXPAT_CONFIG_H', '1'),
-        ]
+        if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
+            expat_inc = []
+            define_macros = []
+            expat_lib = ['expat']
+            expat_sources = []
+        else:
+            expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
+            define_macros = [
+                ('HAVE_EXPAT_CONFIG_H', '1'),
+            ]
+            expat_lib = []
+            expat_sources = ['expat/xmlparse.c',
+                             'expat/xmlrole.c',
+                             'expat/xmltok.c']
 
         exts.append(Extension('pyexpat',
                               define_macros = define_macros,
-                              include_dirs = [expatinc],
-                              sources = ['pyexpat.c',
-                                         'expat/xmlparse.c',
-                                         'expat/xmlrole.c',
-                                         'expat/xmltok.c',
-                                         ],
+                              include_dirs = expat_inc,
+                              libraries = expat_lib,
+                              sources = ['pyexpat.c'] + expat_sources
                               ))
 
         # Fredrik Lundh's cElementTree module.  Note that this also
@@ -1218,7 +1225,8 @@ class PyBuildExt(build_ext):
             define_macros.append(('USE_PYEXPAT_CAPI', None))
             exts.append(Extension('_elementtree',
                                   define_macros = define_macros,
-                                  include_dirs = [expatinc],
+                                  include_dirs = expat_inc,
+                                  libraries = expat_lib,
                                   sources = ['_elementtree.c'],
                                   ))
         else:

python-2.6.4-autotool-intermediates.patch:
 configure |  210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 193 insertions(+), 17 deletions(-)

--- NEW FILE python-2.6.4-autotool-intermediates.patch ---
diff -up ./configure.autotool-intermediates ./configure
--- ./configure.autotool-intermediates	2010-03-22 19:57:14.000000000 -0400
+++ ./configure	2010-03-22 19:57:21.000000000 -0400
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 78813 .
+# From configure.in Revision: 78820 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.6.
 #
@@ -1347,6 +1347,8 @@ Optional Packages:
   --with-suffix=.exe      set executable suffix
   --with-pydebug          build with Py_DEBUG defined
   --with-libs='lib1 ...'  link against additional libs
+  --with-system-expat     build pyexpat module using an installed expat
+                          library
   --with-system-ffi       build _ctypes module using an installed ffi library
   --with-signal-module    disable/enable signal module
   --with-dec-threads      use DEC Alpha/OSF1 thread-safe libraries
@@ -1358,6 +1360,7 @@ Optional Packages:
   --with(out)-doc-strings disable/enable documentation strings
   --with(out)-tsc         enable/disable timestamp counter profile
   --with(out)-pymalloc    disable/enable specialized mallocs
+  --with-valgrind         Enable Valgrind support
   --with-wctype-functions use wctype.h functions
   --with-fpectl           enable SIGFPE catching
   --with-libm=STRING      math library
@@ -3900,7 +3903,7 @@ else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 
 
@@ -4191,7 +4194,7 @@ _ACEOF
 	  ;;
     OSF*)
 	  LDLIBRARY='libpython$(VERSION).so'
-	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
+	  BLDLIBRARY='-L. -lpython$(VERSION)'
 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
 	  ;;
     atheos*)
@@ -5450,7 +5453,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 else
   ac_cv_header_stdc=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
@@ -5471,7 +5474,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 else
   ac_cv_header_stdc=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
@@ -6569,7 +6572,7 @@ _ACEOF
 
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 { echo "$as_me:$LINENO: result: $was_it_defined" >&5
 echo "${ECHO_T}$was_it_defined" >&6; }
@@ -7099,7 +7102,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 else
   ac_cv_type_uid_t=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@@ -14045,6 +14048,19 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 
+# Check for use of the system expat library
+{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
+echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
+
+# Check whether --with-system_expat was given.
+if test "${with_system_expat+set}" = set; then
+  withval=$with_system_expat;
+fi
+
+
+{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
+echo "${ECHO_T}$with_system_expat" >&6; }
+
 # Check for use of the system libffi library
 { echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
 echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
@@ -14224,7 +14240,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 else
   unistd_defines_pthreads=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
     { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
 echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@@ -15838,7 +15854,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
   $EGREP "yes" >/dev/null 2>&1; then
   ipv6type=$i
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		kame)
@@ -15861,7 +15877,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 				ipv6libdir=/usr/local/v6/lib
 				ipv6trylibc=yes
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		linux-glibc)
@@ -15882,7 +15898,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
   ipv6type=$i;
 				ipv6trylibc=yes
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		linux-inet6)
@@ -15920,7 +15936,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		v6d)
@@ -15943,7 +15959,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 				ipv6libdir=/usr/local/v6/lib;
 				BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		zeta)
@@ -15965,7 +15981,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 			;;
 		esac
@@ -16118,6 +16134,166 @@ fi
 { echo "$as_me:$LINENO: result: $with_pymalloc" >&5
 echo "${ECHO_T}$with_pymalloc" >&6; }
 
+# Check for Valgrind support
+{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
+echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
+
+# Check whether --with-valgrind was given.
+if test "${with_valgrind+set}" = set; then
+  withval=$with_valgrind;
+else
+  with_valgrind=no
+fi
+
+{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
+echo "${ECHO_T}$with_valgrind" >&6; }
+if test "$with_valgrind" != no; then
+    if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
+echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
+echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
+echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <valgrind/valgrind.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
+echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <valgrind/valgrind.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
+echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
+echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
+
+fi
+if test $ac_cv_header_valgrind_valgrind_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_VALGRIND 1
+_ACEOF
+
+else
+  { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
+echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
 # Check for --with-wctype-functions
 { echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
 echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
@@ -23743,7 +23919,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -23762,7 +23938,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
@@ -24032,7 +24208,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 

python-2.6.4-distutils-rpath.patch:
 unixccompiler.py |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- NEW FILE python-2.6.4-distutils-rpath.patch ---
diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py
--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath	2009-09-09 04:34:06.000000000 -0400
+++ Python-2.6.4/Lib/distutils/unixccompiler.py	2010-03-15 21:33:25.000000000 -0400
@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler):
     if sys.platform == "cygwin":
         exe_extension = ".exe"
 
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
+        """Remove standard library path from rpath"""
+        libraries, library_dirs, runtime_library_dirs = \
+            CCompiler._fix_lib_args(self, libraries, library_dirs,
+                                    runtime_library_dirs)
+        libdir = sysconfig.get_config_var('LIBDIR')
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
+            runtime_library_dirs.remove(libdir)
+        return libraries, library_dirs, runtime_library_dirs
+
     def preprocess(self, source,
                    output_file=None, macros=None, include_dirs=None,
                    extra_preargs=None, extra_postargs=None):

python-2.6.4-dtrace.patch:
 Include/pydtrace.d |   10 +++++++++
 Makefile.pre.in    |   15 ++++++++++++-
 Python/ceval.c     |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.in       |   32 +++++++++++++++++++++++++++++
 pyconfig.h.in      |    3 ++
 5 files changed, 117 insertions(+), 1 deletion(-)

--- NEW FILE python-2.6.4-dtrace.patch ---
diff -up Python-2.6.4/configure.in.systemtap Python-2.6.4/configure.in
--- Python-2.6.4/configure.in.systemtap	2009-12-18 15:37:15.632242686 -0500
+++ Python-2.6.4/configure.in	2009-12-18 15:37:15.713244483 -0500
@@ -2481,6 +2481,38 @@ if test "$with_valgrind" != no; then
     )
 fi
 
+# Check for dtrace support
+AC_MSG_CHECKING(for --with-dtrace)
+AC_ARG_WITH(dtrace,
+            AC_HELP_STRING(--with(out)-dtrace, disable/enable dtrace support))
+
+if test ! -z "$with_dtrace"
+then
+    if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null
+    then
+	AC_DEFINE(WITH_DTRACE, 1, 
+	 [Define if you want to compile in Dtrace support])
+	with_dtrace="Sun"
+	DTRACEOBJS="Python/dtrace.o"
+	DTRADEHDRS=""
+    elif dtrace -h -o /dev/null -s $srcdir/Include/pydtrace.d
+    then
+	AC_DEFINE(WITH_DTRACE, 1, 
+	 [Define if you want to compile in Dtrace support])
+	with_dtrace="Apple"
+	DTRACEOBJS=""
+	DTRADEHDRS="pydtrace.h"
+    else
+	with_dtrace="no"
+    fi
+else
+    with_dtrace="no"
+fi
+
+AC_MSG_RESULT($with_dtrace)
+AC_SUBST(DTRACEOBJS)
+AC_SUBST(DTRACEHDRS)
+
 # Check for --with-wctype-functions
 AC_MSG_CHECKING(for --with-wctype-functions)
 AC_ARG_WITH(wctype-functions, 
diff -up Python-2.6.4/Include/pydtrace.d.systemtap Python-2.6.4/Include/pydtrace.d
--- Python-2.6.4/Include/pydtrace.d.systemtap	2009-12-18 15:37:15.697243772 -0500
+++ Python-2.6.4/Include/pydtrace.d	2009-12-18 15:37:15.697243772 -0500
@@ -0,0 +1,10 @@
+provider python {
+	probe function__entry(const char *, const char *, int);
+	probe function__return(const char *, const char *, int);
+};
+
+#pragma D attributes Evolving/Evolving/Common provider python provider
+#pragma D attributes Private/Private/Common provider python module
+#pragma D attributes Private/Private/Common provider python function
+#pragma D attributes Evolving/Evolving/Common provider python name
+#pragma D attributes Evolving/Evolving/Common provider python args
diff -up Python-2.6.4/Makefile.pre.in.systemtap Python-2.6.4/Makefile.pre.in
--- Python-2.6.4/Makefile.pre.in.systemtap	2009-12-18 15:37:15.399242581 -0500
+++ Python-2.6.4/Makefile.pre.in	2009-12-18 15:37:15.715242573 -0500
@@ -290,6 +290,7 @@ PYTHON_OBJS=	\
 		Python/formatter_unicode.o \
 		Python/formatter_string.o \
 		Python/$(DYNLOADFILE) \
+		@DTRACEOBJS@ \
 		$(LIBOBJS) \
 		$(MACHDEP_OBJS) \
 		$(THREADOBJ)
@@ -577,6 +578,18 @@ Python/formatter_unicode.o: $(srcdir)/Py
 Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \
 				$(STRINGLIB_HEADERS)
 
+# Only needed with --with-dtrace
+buildinclude:
+	mkdir -p Include
+
+Include/pydtrace.h: buildinclude $(srcdir)/Include/pydtrace.d
+	dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Include/pydtrace.d
+
+Python/ceval.o: Include/pydtrace.h
+
+Python/dtrace.o: buildinclude $(srcdir)/Include/pydtrace.d Python/ceval.o
+	dtrace -o $@ $(DFLAGS) -C -G -s $(srcdir)/Include/pydtrace.d Python/ceval.o
+
 ############################################################################
 # Header files
 
@@ -1213,6 +1231,6 @@ Python/thread.o: @THREADHEADERS@
 .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
 .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
 .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean 
-.PHONY: smelly funny patchcheck
+.PHONY: smelly funny patchcheck buildinclude
 
 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff -up Python-2.6.4/pyconfig.h.in.systemtap Python-2.6.4/pyconfig.h.in
--- Python-2.6.4/pyconfig.h.in.systemtap	2009-12-18 15:37:15.649243175 -0500
+++ Python-2.6.4/pyconfig.h.in	2009-12-18 15:37:15.719242803 -0500
@@ -964,6 +989,9 @@
 /* Define if you want documentation strings in extension modules */
 #undef WITH_DOC_STRINGS
 
+/* Define if you want to compile in Dtrace support */
+#undef WITH_DTRACE
+
 /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
    linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
    Dyld is necessary to support frameworks. */
diff -up Python-2.6.4/Python/ceval.c.systemtap Python-2.6.4/Python/ceval.c
--- Python-2.6.4/Python/ceval.c.systemtap	2009-05-30 17:43:48.000000000 -0400
+++ Python-2.6.4/Python/ceval.c	2009-12-18 15:37:15.723242474 -0500
@@ -19,6 +19,10 @@
 
 #include <ctype.h>
 
+#ifdef WITH_DTRACE
+#include "pydtrace.h"
+#endif
+
 #ifndef WITH_TSC
 
 #define READ_TIMESTAMP(var)
@@ -527,6 +531,55 @@ PyEval_EvalCode(PyCodeObject *co, PyObje
 			  NULL);
 }
 
+#ifdef WITH_DTRACE
+static void
+dtrace_entry(PyFrameObject *f)
+{
+	const char *filename;
+	const char *fname;
+	int lineno;
+	
+	filename = PyString_AsString(f->f_code->co_filename);
+	fname = PyString_AsString(f->f_code->co_name);
+	lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
+
+	PYTHON_FUNCTION_ENTRY((char *)filename, (char *)fname, lineno);
+
+	/*
+	 * Currently a USDT tail-call will not receive the correct arguments.
+	 * Disable the tail call here.
+	 */
+#if defined(__sparc)
+	asm("nop");
+#endif
+}
+
+static void
+dtrace_return(PyFrameObject *f)
+{
+	const char *filename;
+	const char *fname;
+	int lineno;
+	
+	filename = PyString_AsString(f->f_code->co_filename);
+	fname = PyString_AsString(f->f_code->co_name);
+	lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
+	PYTHON_FUNCTION_RETURN((char *)filename, (char *)fname, lineno);
+
+	/*
+	 * Currently a USDT tail-call will not receive the correct arguments.
+	 * Disable the tail call here.
+	 */
+#if defined(__sparc)
+	asm("nop");
+#endif
+}
+#else
+#define	PYTHON_FUNCTION_ENTRY_ENABLED() 0
+#define	PYTHON_FUNCTION_RETURN_ENABLED() 0
+#define	dtrace_entry(f)
+#define	dtrace_return(f)
+#endif
 
 /* Interpreter main loop */
 
@@ -763,6 +891,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int
 		}
 	}
 
+        if (PYTHON_FUNCTION_ENTRY_ENABLED())
+                dtrace_entry(f);
+
 	co = f->f_code;
 	names = co->co_names;
 	consts = co->co_consts;
@@ -2723,6 +2863,8 @@ fast_yield:
 
 	/* pop frame */
 exit_eval_frame:
+	if (PYTHON_FUNCTION_RETURN_ENABLED())
+		dtrace_return(f);
 	Py_LeaveRecursiveCall();
 	tstate->frame = f->f_back;
 

python-2.6.4-expat-version.patch:
 Include/pyexpat.h      |   22 ++++++++++++++++++++++
 Modules/_elementtree.c |    4 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

--- NEW FILE python-2.6.4-expat-version.patch ---
diff -up Python-2.6.4/Include/pyexpat.h.expat-version Python-2.6.4/Include/pyexpat.h
--- Python-2.6.4/Include/pyexpat.h.expat-version	2006-06-19 19:21:25.000000000 -0400
+++ Python-2.6.4/Include/pyexpat.h	2010-03-04 16:55:58.000000000 -0500
@@ -5,6 +5,28 @@
 
 #define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.0"
 
+
+/*
+  Definition of XML_Size
+
+  We want to build against the system copy of expat, but XML_Size did not exist
+  in RHEL5's expat version.
+
+  /usr/include/expat_external in expat-devel-2.0.1-8.fc12.i686 contains some
+  preprocessor logic for this, but this is not seen in RHEL5's
+  expat-devel-1.95.8-8.2.1 which instead has the return types hardcoded as
+  "int" from:
+    XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser);
+    XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser);
+
+  This appears to be necessary for the pyexpat.h in Python-2.6.4 to compile
+  against the system expat.
+
+  Ensure that it matches the hardcoded "int" type from the system expat:
+*/
+typedef int XML_Size;
+
+
 struct PyExpat_CAPI 
 {
     char* magic; /* set to PyExpat_CAPI_MAGIC */
diff -up Python-2.6.4/Modules/_elementtree.c.expat-version Python-2.6.4/Modules/_elementtree.c
--- Python-2.6.4/Modules/_elementtree.c.expat-version	2010-03-04 17:00:48.000000000 -0500
+++ Python-2.6.4/Modules/_elementtree.c	2010-03-04 17:01:04.000000000 -0500
@@ -2003,7 +2003,7 @@ expat_default_handler(XMLParserObject* s
         Py_XDECREF(res);
     } else {
         PyErr_Format(
-            PyExc_SyntaxError, "undefined entity &%s;: line %ld, column %ld",
+            PyExc_SyntaxError, "undefined entity &%s;: line %d, column %d",
             PyString_AS_STRING(key),
             EXPAT(GetErrorLineNumber)(self->parser),
             EXPAT(GetErrorColumnNumber)(self->parser)
@@ -2364,7 +2364,7 @@ expat_parse(XMLParserObject* self, char*
 
     if (!ok) {
         PyErr_Format(
-            PyExc_SyntaxError, "%s: line %ld, column %ld",
+            PyExc_SyntaxError, "%s: line %d, column %d",
             EXPAT(ErrorString)(EXPAT(GetErrorCode)(self->parser)),
             EXPAT(GetErrorLineNumber)(self->parser),
             EXPAT(GetErrorColumnNumber)(self->parser)

python-2.6.4-no-static-lib.patch:
 Makefile.pre.in |   26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

--- NEW FILE python-2.6.4-no-static-lib.patch ---
diff -up Python-2.6.4/Makefile.pre.in.no-static-lib Python-2.6.4/Makefile.pre.in
--- Python-2.6.4/Makefile.pre.in.no-static-lib	2010-01-18 13:11:10.975859689 -0500
+++ Python-2.6.4/Makefile.pre.in	2010-01-18 13:14:27.524859334 -0500
@@ -382,7 +382,7 @@ coverage:
 
 
 # Build the interpreter
-$(BUILDPYTHON):	Modules/python.o $(LIBRARY) $(LDLIBRARY)
+$(BUILDPYTHON):	Modules/python.o $(LDLIBRARY)
 		$(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
 			Modules/python.o \
 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
@@ -398,18 +398,6 @@ sharedmods: $(BUILDPYTHON)
 	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
 	esac
 
-# Build static library
-# avoid long command lines, same as LIBRARY_OBJS
-$(LIBRARY): $(LIBRARY_OBJS)
-	-rm -f $@
-	$(AR) cr $@ Modules/getbuildinfo.o
-	$(AR) cr $@ $(PARSER_OBJS)
-	$(AR) cr $@ $(OBJECT_OBJS)
-	$(AR) cr $@ $(PYTHON_OBJS)
-	$(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
-	$(AR) cr $@ $(MODOBJS)
-	$(RANLIB) $@
-
 libpython$(VERSION).so: $(LIBRARY_OBJS)
 	if test $(INSTSONAME) != $(LDLIBRARY); then \
 		$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -945,18 +933,6 @@ libainstall:	all
 		else	true; \
 		fi; \
 	done
-	@if test -d $(LIBRARY); then :; else \
-		if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-			if test "$(SO)" = .dll; then \
-				$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-			else \
-				$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-				$(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-			fi; \
-		else \
-			echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-		fi; \
-	fi
 	$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
 	$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
 	$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in


--- NEW FILE python26.spec ---
%{!?__python_ver:%global __python_ver EMPTY}
%global __python_ver 26
%global unicode ucs4

%global _default_patch_fuzz 2

%if "%{__python_ver}" != "EMPTY"
%global main_python 0
%global python python%{__python_ver}
%global tkinter tkinter%{__python_ver}
%else
%global main_python 1
%global python python
%global tkinter tkinter
%endif

%global pybasever 2.6
%global pylibdir %{_libdir}/python%{pybasever}
%global tools_dir %{pylibdir}/Tools
%global demo_dir %{pylibdir}/Demo
%global doc_tools_dir %{pylibdir}/Doc/tools
%global dynload_dir %{pylibdir}/lib-dynload
%global site_packages %{pylibdir}/site-packages

# We need to get a newer configure generated out of configure.in for the following
# patches:
#   patch 4 (CFLAGS)
#   patch 52 (valgrind)
#   patch 55 (systemtap)
# For patch 55 (systemtap), we need to get a new header for configure to use
#
# configure.in requires autoconf 2.61, but the version in RHEL 5 is 2.59
#
# For now, we'll generate a patch to the generated configure script on a
# machine that has a local copy of autoconf 2.61
#
# Instructions on obtaining such a copy can be seen at
#   http://bugs.python.org/issue7997
#
# To make it easy to regenerate the patch, this specfile can be run in two
# ways:
# (i) regenerate_autotooling_patch  0 : the normal approach: prep the
# source tree using a pre-generated patch to the "configure" script, and do a
# full build
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
# workstation: prep the source tree without patching configure, then rerun a
# local copy of autoconf-2.61, regenerate the patch, then exit, without doing
# the rest of the build
%global regenerate_autotooling_patch 0

# Python's configure script defines SOVERSION, and this is used in the Makefile
# to determine INSTSONAME, the name of the libpython DSO:
#   LDLIBRARY='libpython$(VERSION).so'
#   INSTSONAME="$LDLIBRARY".$SOVERSION
# We mirror this here in order to make it easier to add the -gdb.py hooks.
# (if these get out of sync, the payload of the libs subpackage will fail
# and halt the build)
%global py_SOVERSION 1.0
%global py_INSTSONAME libpython%{pybasever}.so.%{py_SOVERSION}

%global with_gdb_hooks 0

%global with_systemtap 0

%global with_system_expat 0

# ppc in Koji doesn't seem to be able to locate valgrind-devel, for some reason
%ifarch ppc
%global with_valgrind 0
%else
%global with_valgrind 1
%endif

# Redefine __os_install_post, removing the invocation of brp-python-bytecompile
# (this is normally defined in /usr/lib/rpm/redhat/macros)
#
# brp-python-bytecompile is normally called without a parameter, which
# effectively hardcodes the use of /usr/bin/python, leaving the .pyc/.pyo files
# with an ABI version of 2.4, rather than 2.6
#
# This can be checked with "hexdump -C".
# A python 2.6 .pyo file should begin with:
#     d1 f2 0d 0a
# corresponding to MAGIC=62161 = 0xF2D1
# 
# whereas a python 2.4 .pyo file should begin with:
#     6d f2 0d 0a
# corresponding to MAGIC=62061 = 0xF26D

%global __os_install_post    \
    /usr/lib/rpm/redhat/brp-compress \
    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
    /usr/lib/rpm/redhat/brp-java-repack-jars \
%{nil}


Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
Version: 2.6.5
Release: 3%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
Provides: python(abi) = %{pybasever}
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2


# We install a collection of hooks for gdb that make it easier to debug
# executables linked against libpython (such as /usr/lib/python itself)
#
# These hooks are implemented in Python itself
#
# gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
# We put them in the debuginfo package by installing them to e.g.:
#  /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py
#
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
# information
#
# Downloaded from:
# http://fedorapeople.org/gitweb?p=dmalcolm/public_git/libpython.git;a=snapshot;h=36a517ef7848cbd0b3dcc7371f32e47ac4c87eba;sf=tgz
Source1: libpython-36a517ef7848cbd0b3dcc7371f32e47ac4c87eba.tar.gz


# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
# version of pythondeps.sh:
Source2: pythondeps.sh
%global __python_requires %{SOURCE2}

# Systemtap tapset to make it easier to use the systemtap static probes
# (actually a template; LIBRARY_PATH will get fixed up during install)
# Written by dmalcolm; not yet sent upstream
Source3: libpython.stp


# Example systemtap script using the tapset
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
Source4: systemtap-example.stp


# Similarly to how we needed to redefine __os_install_post (see above), drop
# a file into /etc/rpm/macros providing an alternative definition of that macro
#
# This defines a __python26_os_install_post macro, so that a specfile for a
# module should merely need to redefine __os_install_post to this in order to
# be byte-compiled using python2.6
Source5: macros.python26

# A bash script for more easily running the regression test suite.
# Taken from the "py3k" branch from upstream:
Source6: runtests.sh

# Modules/Setup.dist is ultimately used by the "makesetup" script to construct
# the Makefile and config.c
#
# Upstream leaves many things disabled by default, to try to make it easy as
# possible to build the code on as many platforms as possible.
#
# TODO: many modules can also now be built by setup.py after the python binary
# has been built; need to assess if we should instead build things there
#
# We patch it downstream as follows:
#   - various modules are built by default by upstream as static libraries;
#   we built them as shared libraries
#   - build the "readline" module (appears to also be handled by setup.py now)
#   - enable the build of the following modules:
#     - array arraymodule.c	# array objects
#     - cmath cmathmodule.c # -lm # complex math library functions
#     - math mathmodule.c # -lm # math library functions, e.g. sin()
#     - _struct _struct.c	# binary structure packing/unpacking
#     - time timemodule.c # -lm # time operations and variables
#     - operator operator.c	# operator.add() and similar goodies
#     - _weakref _weakref.c	# basic weak reference support
#     - _testcapi _testcapimodule.c    # Python C API test module
#     - _random _randommodule.c	# Random number generator
#     - _collections _collectionsmodule.c # Container types
#     - itertools itertoolsmodule.c
#     - strop stropmodule.c
#     - _functools _functoolsmodule.c
#     - _bisect _bisectmodule.c	# Bisection algorithms
#     - unicodedata unicodedata.c    # static Unicode character database
#     - _locale _localemodule.c
#     - fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
#     - spwd spwdmodule.c		# spwd(3) 
#     - grp grpmodule.c		# grp(3)
#     - select selectmodule.c	# select(2); not on ancient System V
#     - mmap mmapmodule.c  # Memory-mapped files
#     - _csv _csv.c  # CSV file helper
#     - _socket socketmodule.c  # Socket module helper for socket(2)
#     - _ssl _ssl.c
#     - crypt cryptmodule.c -lcrypt	# crypt(3)
#     - nis nismodule.c -lnsl	# Sun yellow pages -- not everywhere
#     - termios termios.c	# Steen Lumholt's termios module
#     - resource resource.c	# Jeremy Hylton's rlimit interface
#     - audioop audioop.c	# Operations on audio samples
#     - imageop imageop.c	# Operations on images
#     - _md5 md5module.c md5.c
[...1728 lines suppressed...]
- Added BuildPrereq dependency on gcc-c++

* Fri Aug 30 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-17
- security fix for _execvpe

* Tue Aug 13 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-16
- Fix  #71011,#71134, #58157

* Wed Aug  7 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-15
- Resurrect tkinter
- Fix for distutils (#67671)
- Fix #69962

* Thu Jul 25 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-14
- Obsolete tkinter/tkinter2 (#69838)

* Tue Jul 23 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-13
- Doc fixes (#53951) - not on alpha at the momemt

* Mon Jul  8 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-12
- fix pydoc (#68082)

* Mon Jul  8 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-11
- Add db4-devel as a BuildPrereq

* Fri Jun 21 2002 Tim Powers <timp at redhat.com> 2.2.1-10
- automated rebuild

* Mon Jun 17 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-9
- Add Japanese codecs (#66352)

* Tue Jun 11 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-8
- No more tkinter...

* Wed May 29 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-7
- Rebuild

* Tue May 21 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-6
- Add the email subcomponent (#65301)

* Fri May 10 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-5
- Rebuild

* Thu May 02 2002 Than Ngo <than at redhat.com> 2.2.1-4
- rebuild i new enviroment

* Tue Apr 23 2002 Trond Eivind Glomsrød <teg at redhat.com>
- Use ucs2, not ucs4, to avoid breaking tkinter (#63965)

* Mon Apr 22 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-2
- Make it use db4

* Fri Apr 12 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2.1-1
- 2.2.1 - a bugfix-only release

* Fri Apr 12 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-16
- the same, but in builddirs - this will remove them from the 
  docs package, which doesn't look in the buildroot for files.

* Fri Apr 12 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-15
- Get rid of temporary files and .cvsignores included 
  in the tarball and make install

* Fri Apr  5 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-14
- Don't own lib-tk in main package, only in tkinter (#62753)

* Mon Mar 25 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-13
- rebuild

* Mon Mar 25 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-12
- rebuild

* Fri Mar  1 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-11
- Add a not to the Distutils obsoletes test (doh!)

* Fri Mar  1 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-10
- Rebuild

* Mon Feb 25 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-9
- Only obsolete Distutils when built as python

* Thu Feb 21 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-8
- Make files in /usr/bin install side by side with python 1.5 when
- Drop explicit requirement of db4
  built as python2

* Thu Jan 31 2002 Elliot Lee <sopwith at redhat.com> 2.2-7
- Use version and pybasever macros to make updating easy
- Use _smp_mflags macro

* Tue Jan 29 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-6
- Add db4-devel to BuildPrereq

* Fri Jan 25 2002 Nalin Dahyabhai <nalin at redhat.com> 2.2-5
- disable ndbm support, which is db2 in disguise (really interesting things
  can happen when you mix db2 and db4 in a single application)

* Thu Jan 24 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-4
- Obsolete subpackages if necesarry 
- provide versioned python2
- build with db4

* Wed Jan 16 2002 Trond Eivind Glomsrød <teg at redhat.com> 2.2-3
- Alpha toolchain broken. Disable build on alpha.
- New openssl

* Wed Dec 26 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-1
- 2.2 final

* Fri Dec 14 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.11c1
- 2.2 RC 1
- Don't include the _tkinter module in the main package - it's 
  already in the tkiter packace
- Turn off the mpzmodule, something broke in the buildroot

* Wed Nov 28 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.10b2
- Use -fPIC for OPT as well, in lack of a proper libpython.so

* Mon Nov 26 2001 Matt Wilson <msw at redhat.com> 2.2-0.9b2
- changed DESTDIR to point to / so that distutils will install dynload
  modules properly in the installroot

* Fri Nov 16 2001 Matt Wilson <msw at redhat.com> 2.2-0.8b2
- 2.2b2

* Fri Oct 26 2001 Matt Wilson <msw at redhat.com> 2.2-0.7b1
- python2ify

* Fri Oct 19 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.5b1
- 2.2b1

* Sun Sep 30 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.4a4
- 2.2a4
- Enable UCS4 support
- Enable IPv6
- Provide distutils
- Include msgfmt.py and pygettext.py

* Fri Sep 14 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.3a3
- Obsolete Distutils, which is now part of the main package
- Obsolete python2

* Thu Sep 13 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.2a3
- Add docs, tools and tkinter subpackages, to match the 1.5 layout

* Wed Sep 12 2001 Trond Eivind Glomsrød <teg at redhat.com> 2.2-0.1a3
- 2.2a3
- don't build tix and blt extensions

* Mon Aug 13 2001 Trond Eivind Glomsrød <teg at redhat.com>
- Add tk and tix to build dependencies

* Sat Jul 21 2001 Trond Eivind Glomsrød <teg at redhat.com>
- 2.1.1 bugfix release - with a GPL compatible license

* Fri Jul 20 2001 Trond Eivind Glomsrød <teg at redhat.com>
- Add new build dependencies (#49753)

* Tue Jun 26 2001 Nalin Dahyabhai <nalin at redhat.com>
- build with -fPIC

* Fri Jun  1 2001 Trond Eivind Glomsrød <teg at redhat.com>
- 2.1
- reorganization of file includes

* Wed Dec 20 2000 Trond Eivind Glomsrød <teg at redhat.com>
- fix the "requires" clause, it lacked a space causing problems
- use %%{_tmppath}
- don't define name, version etc
- add the available patches from the Python home page

* Fri Dec 15 2000 Matt Wilson <msw at redhat.com>
- added devel subpackage

* Fri Dec 15 2000 Matt Wilson <msw at redhat.com>
- modify all files to use "python2.0" as the intrepter
- don't build the Expat bindings
- build against db1

* Mon Oct 16 2000 Jeremy Hylton <jeremy at beopen.com>
- updated for 2.0 final

* Mon Oct  9 2000 Jeremy Hylton <jeremy at beopen.com>
- updated for 2.0c1
- build audioop, imageop, and rgbimg extension modules
- include xml.parsers subpackage
- add test.xml.out to files list

* Thu Oct  5 2000 Jeremy Hylton <jeremy at beopen.com>
- added bin/python2.0 to files list (suggested by Martin v. L?)

* Tue Sep 26 2000 Jeremy Hylton <jeremy at beopen.com>
- updated for release 1 of 2.0b2
- use .bz2 version of Python source

* Tue Sep 12 2000 Jeremy Hylton <jeremy at beopen.com>
- Version 2 of 2.0b1
- Make the package relocatable.  Thanks to Suchandra Thapa.
- Exclude Tkinter from main RPM.  If it is in a separate RPM, it is
  easier to track Tk releases.


--- NEW FILE pythondeps.sh ---
#!/bin/bash

[ $# -ge 1 ] || {
    cat > /dev/null
    exit 0
}

case $1 in
-P|--provides)
    shift
    # Match buildroot/payload paths of the form
    #    /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
    # generating a line of the form
    #    python(abi) = MAJOR.MINOR
    # (Don't match against -config tools e.g. /usr/bin/python2.6-config)
    grep "/usr/bin/python.\..$" \
        | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
    ;;
-R|--requires)
    shift
    # Match buildroot paths of the form
    #    /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/  and
    #    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
    # generating (uniqely) lines of the form:
    #    python(abi) = MAJOR.MINOR
    grep "/usr/lib[^/]*/python.\../.*" \
        | sed -e "s|.*/usr/lib[^/]*/python\(.\..\)/.*|python(abi) = \1|g" \
        | sort | uniq
    ;;
esac

exit 0


--- NEW FILE runtests.sh ---
#!/bin/bash

HELP="Usage: ./runtests.py [-h] [-x] [flags] [tests]

Runs each unit test independently, with output directed to a file in
OUT/<test>.out.  If no tests are given, all tests are run; otherwise,
only the specified tests are run, unless -x is also given, in which
case all tests *except* those given are run.

Standard output shows the name of the tests run, with 'BAD' or
'SKIPPED' added if the test didn't produce a positive result.  Also,
three files are created, named 'BAD', 'GOOD' and 'SKIPPED', to which
are written the names of the tests categorized by result.

Flags (arguments starting with '-') are passed transparently to
regrtest.py, except for -x, which is processed here."

# Choose the Python binary.
case `uname` in
Darwin) PYTHON=./python.exe;;
CYGWIN*) PYTHON=./python.exe;;
*)      PYTHON=./python;;
esac

PYTHON="$PYTHON -bb"

# Unset PYTHONPATH, just to be sure.
unset PYTHONPATH

# Create the output directory if necessary.
mkdir -p OUT

# Empty the summary files.
>GOOD
>BAD
>SKIPPED

# Process flags (transparently pass these on to regrtest.py)
FLAGS=""
EXCEPT=""
while :
do
    case $1 in
    -h|--h|-help|--help) echo "$HELP"; exit;;
    --) FLAGS="$FLAGS $1"; shift; break;;
    -x) EXCEPT="$1"; shift;;
    -*) FLAGS="$FLAGS $1"; shift;;
    *)  break;;
    esac
done

# Compute the list of tests to run.
case "$#$EXCEPT" in
0) 
    TESTS=`(cd Lib/test; ls test_*.py | sed 's/\.py//')`
    ;;
*-x)
    PAT="^(`echo $@ | sed 's/\.py//' | sed 's/ /|/'`)$"
    TESTS=`(cd Lib/test; ls test_*.py | sed 's/\.py//' | egrep -v "$PAT")`
    ;;
*)
    TESTS="$@"
    ;;
esac

# Run the tests.
for T in $TESTS
do
    echo -n $T
    if   case $T in
         *curses*)
	     echo
	     $PYTHON -E Lib/test/regrtest.py $FLAGS $T 2>OUT/$T.out
	     ;;
         *)  $PYTHON -E Lib/test/regrtest.py $FLAGS $T >OUT/$T.out 2>&1;;
         esac
    then
        if grep -q "1 test skipped:" OUT/$T.out
        then
            echo " SKIPPED"
            echo $T >>SKIPPED
        else
            echo
            echo $T >>GOOD
        fi
    else
        echo " BAD"
        echo $T >>BAD
    fi
done

# Summarize results
wc -l BAD GOOD SKIPPED


--- NEW FILE systemtap-example.stp ---
/*
    Example usage of the Python systemtap tapset to show a nested view of all
    Python function calls (and returns) across the whole system.

    Run this using
        stap systemtap-example.stp
    to instrument all Python processes on the system, or (for example) using
        stap systemtap-example.stp -c COMMAND
    to instrument a specific program (implemented in Python)
*/
probe python.function.entry
{
  printf("%s => %s in %s:%d\n", thread_indent(1), funcname, filename, lineno);
}

probe python.function.return
{
  printf("%s <= %s in %s:%d\n", thread_indent(-1), funcname, filename, lineno);
}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/python26/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	9 Apr 2010 04:55:28 -0000	1.1
+++ .cvsignore	9 Apr 2010 15:06:00 -0000	1.2
@@ -0,0 +1,2 @@
+Python-2.6.5.tar.bz2
+libpython-36a517ef7848cbd0b3dcc7371f32e47ac4c87eba.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/python26/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	9 Apr 2010 04:55:28 -0000	1.1
+++ sources	9 Apr 2010 15:06:01 -0000	1.2
@@ -0,0 +1,2 @@
+6bef0417e71a1a1737ccf5750420fdb3  Python-2.6.5.tar.bz2
+e9b2198d72a406698c8de07467654204  libpython-36a517ef7848cbd0b3dcc7371f32e47ac4c87eba.tar.gz



More information about the scm-commits mailing list