7121707 python 2.6.4 should be updated to latest 2.6.X release
authorRich Burridge <rich.burridge@oracle.com>
Wed, 30 May 2012 12:40:14 -0700
changeset 841 1a62cefa636d
parent 840 926eb95ceab3
child 842 9da05efee3cd
7121707 python 2.6.4 should be updated to latest 2.6.X release
components/python/python26/Makefile
components/python/python26/patches/Python26-00-filemagic.patch
components/python/python26/patches/Python26-01-solaris-lib-dirs.patch
components/python/python26/patches/Python26-05-isalibs.patch
components/python/python26/patches/Python26-06-write_compiled_module-atomic.patch
components/python/python26/patches/Python26-07-dtrace.patch
components/python/python26/patches/Python26-15-getcwd.patch
components/python/python26/patches/Python26-17-netpacket-packet-h.patch
components/python/python26/patches/Python26-21-getpass.patch
components/python/python26/patches/Python26-22-bindir.patch
components/python/python26/patches/Python26-23-none-on-connect.patch
components/python/python26/patches/Python26-24-makedev.patch
components/python/python26/patches/Python26-25-closerange.patch
components/python/python26/patches/Python26-25-studio-profile.patch
components/python/python26/python-26.p5m
--- a/components/python/python26/Makefile	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/Makefile	Wed May 30 12:40:14 2012 -0700
@@ -25,12 +25,12 @@
 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
 
 COMPONENT_NAME=		Python
-COMPONENT_VERSION=	2.6.4
+COMPONENT_VERSION=	2.6.8
 COMPONENT_PROJECT_URL=	http://python.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:dad8d5575144a210d5cc4fdbc40b8a26386e9cdb1ef58941bec0be02c7cb9d89
+    sha256:c34036718ee1f091736677f543bc7960861cf9fcbea77d49572b59f7f1ab3c3f
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 
 include $(WS_TOP)/make-rules/prep.mk
--- a/components/python/python26/patches/Python26-00-filemagic.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-00-filemagic.patch	Wed May 30 12:40:14 2012 -0700
@@ -56,7 +56,7 @@
 --- Python-2.6.4/Lib/lib2to3/tests/pytree_idempotency.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/pytree_idempotency.py	Mon Feb 21 10:46:24 2011
 @@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+-#!/usr/bin/env python
 +#!/usr/bin/python2.6
  # Copyright 2006 Google, Inc. All Rights Reserved.
  # Licensed to PSF under a Contributor Agreement.
@@ -64,8 +64,7 @@
 diff -u Python-2.6.4/Lib/lib2to3/tests/test_all_fixers.py.orig Python-2.6.4/Lib/lib2to3/tests/test_all_fixers.py
 --- Python-2.6.4/Lib/lib2to3/tests/test_all_fixers.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/test_all_fixers.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
  """Tests that run all fixer modules over an input stream.
  
@@ -73,17 +72,15 @@
 diff -u Python-2.6.4/Lib/lib2to3/tests/test_util.py.orig Python-2.6.4/Lib/lib2to3/tests/test_util.py
 --- Python-2.6.4/Lib/lib2to3/tests/test_util.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/test_util.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
- """ Test suite for the code in fixes.util """
- # Author: Collin Winter
+ """ Test suite for the code in fixer_util """
  
+ # Testing imports
 diff -u Python-2.6.4/Lib/lib2to3/tests/test_parser.py.orig Python-2.6.4/Lib/lib2to3/tests/test_parser.py
 --- Python-2.6.4/Lib/lib2to3/tests/test_parser.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/test_parser.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
  """Test suite for 2to3's parser and grammar files.
  
@@ -91,8 +88,7 @@
 diff -u Python-2.6.4/Lib/lib2to3/tests/test_pytree.py.orig Python-2.6.4/Lib/lib2to3/tests/test_pytree.py
 --- Python-2.6.4/Lib/lib2to3/tests/test_pytree.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/test_pytree.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
  # Copyright 2006 Google, Inc. All Rights Reserved.
  # Licensed to PSF under a Contributor Agreement.
@@ -100,8 +96,7 @@
 diff -u Python-2.6.4/Lib/lib2to3/tests/test_fixers.py.orig Python-2.6.4/Lib/lib2to3/tests/test_fixers.py
 --- Python-2.6.4/Lib/lib2to3/tests/test_fixers.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/tests/test_fixers.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
  """ Test suite for the fixer modules """
  # Author: Collin Winter
@@ -109,8 +104,7 @@
 diff -u Python-2.6.4/Lib/lib2to3/refactor.py.orig Python-2.6.4/Lib/lib2to3/refactor.py
 --- Python-2.6.4/Lib/lib2to3/refactor.py.orig	Mon Feb 21 10:46:24 2011
 +++ Python-2.6.4/Lib/lib2to3/refactor.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2.5
+@@ -1,3 +1,4 @@
 +#!/usr/bin/python2.6
  # Copyright 2006 Google, Inc. All Rights Reserved.
  # Licensed to PSF under a Contributor Agreement.
@@ -494,14 +488,14 @@
     Roger E. Masse
  """
 diff -u Python-2.6.4/Lib/test/test_pep263.py.orig Python-2.6.4/Lib/test/test_pep263.py
---- Python-2.6.4/Lib/test/test_pep263.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_pep263.py	Mon Feb 21 10:46:32 2011
+--- Python-2.6.4/Lib/test/test_pep263.py.orig   Mon Feb 21 10:46:32 2011
++++ Python-2.6.4/Lib/test/test_pep263.py        Mon Feb 21 10:46:32 2011
 @@ -1,4 +1,4 @@
--#! -*- coding: koi8-r -*-
+-# -*- coding: koi8-r -*-
 +#!/usr/bin/python2.6
- # This file is marked as binary in SVN, to prevent MacCVS from recoding it.
- 
- import unittest
+ 
+ import unittest
+ from test import test_support
 diff -u Python-2.6.4/Lib/test/test_anydbm.py.orig Python-2.6.4/Lib/test/test_anydbm.py
 --- Python-2.6.4/Lib/test/test_anydbm.py.orig	Mon Feb 21 10:46:35 2011
 +++ Python-2.6.4/Lib/test/test_anydbm.py	Mon Feb 21 10:46:35 2011
@@ -2230,3 +2224,19 @@
  # -*- coding: utf-8 -*-
  
  # Check for stylistic and formal issues in .rst and .py
+--- Python-2.6.8/Lib/lib2to3/tests/data/different_encoding.py.orig	2012-05-11 08:48:22.819694540 -0700
++++ Python-2.6.8/Lib/lib2to3/tests/data/different_encoding.py	2012-05-11 08:48:38.042397815 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python2.6
+ # -*- coding: utf-8 -*-
+ print u'ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'
+ 
+--- Python-2.6.8/Lib/whichdb.py.orig	2012-05-11 08:51:07.506663732 -0700
++++ Python-2.6.8/Lib/whichdb.py	2012-05-11 08:51:22.897281496 -0700
+@@ -1,4 +1,4 @@
+-# !/usr/bin/env python
++#!/usr/bin/python2.6
+ """Guess which db package to use to open a db file."""
+ 
+ import os
--- a/components/python/python26/patches/Python26-01-solaris-lib-dirs.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-01-solaris-lib-dirs.patch	Wed May 30 12:40:14 2012 -0700
@@ -16,7 +16,7 @@
 new file mode 100644
 --- Python-2.6.4/setup.py
 +++ Python-2.6.4/setup.py
-@@ -309,10 +309,10 @@
+@@ -355,10 +355,10 @@
          return sys.platform
  
      def detect_modules(self):
@@ -31,7 +31,7 @@
          # Add paths specified in the environment variables LDFLAGS and
          # CPPFLAGS for header and library files.
          # We must get the values from the Makefile and not the environment
-@@ -610,11 +610,22 @@
+@@ -687,11 +687,22 @@
          exts.append( Extension('_csv', ['_csv.c']) )
  
          # socket(2)
@@ -56,7 +56,7 @@
                                '/usr/contrib/ssl/include/'
                               ]
          ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-@@ -625,8 +636,12 @@
+@@ -702,8 +713,12 @@
                                 ['/usr/kerberos/include'])
              if krb5_h:
                  ssl_incs += krb5_h
@@ -70,7 +70,7 @@
                                        '/usr/contrib/ssl/lib/'
                                       ] )
  
-@@ -635,6 +650,7 @@
+@@ -712,6 +727,7 @@
              exts.append( Extension('_ssl', ['_ssl.c'],
                                     include_dirs = ssl_incs,
                                     library_dirs = ssl_libs,
@@ -78,7 +78,7 @@
                                     libraries = ['ssl', 'crypto'],
                                     depends = ['socketmodule.h']), )
          else:
-@@ -1079,6 +1095,16 @@
+@@ -1191,16 +1207,34 @@
  
          # Curses support, requiring the System V version of curses, often
          # provided by the ncurses library.
@@ -93,25 +93,34 @@
 +            else:
 +                curses_lib_dirs.append('/usr/gnu/lib/amd64')
          panel_library = 'panel'
-         if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
-             curses_libs = ['ncursesw']
-@@ -1087,10 +1111,13 @@
-             panel_library = 'panelw'
+-        if curses_library.startswith('ncurses'):
+-            if curses_library == 'ncursesw':
+-                # Bug 1464056: If _curses.so links with ncursesw,
+-                # _curses_panel.so must link with panelw.
+-                panel_library = 'panelw'
+-            curses_libs = [curses_library]
++        if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
++            curses_libs = ['ncursesw']
++            # Bug 1464056: If _curses.so links with ncursesw,
++            # _curses_panel.so must link with panelw.
++            panel_library = 'panelw'
              exts.append( Extension('_curses', ['_cursesmodule.c'],
                                     libraries = curses_libs) )
--        elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
+-        elif curses_library == 'curses' and platform != 'darwin':
 +        elif (self.compiler.find_library_file(lib_dirs + curses_lib_dirs, 'ncurses')):
-             curses_libs = ['ncurses']
-             exts.append( Extension('_curses', ['_cursesmodule.c'],
--                                   libraries = curses_libs) )
++            curses_libs = ['ncurses']
++            exts.append( Extension('_curses', ['_cursesmodule.c'],
 +                                   libraries = curses_libs,
 +                                   library_dirs = curses_lib_dirs,
 +                                   runtime_library_dirs = curses_lib_dirs,
 +                                   include_dirs = curses_inc_dirs ) )
-         elif (self.compiler.find_library_file(lib_dirs, 'curses')
-               and platform != 'darwin'):
++
++        elif (self.compiler.find_library_file(lib_dirs, 'curses')
++              and platform != 'darwin'):
                  # OSX has an old Berkeley curses, not good enough for
-@@ -1109,9 +1136,12 @@
+                 # the _curses module.
+             if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
+@@ -1217,9 +1251,12 @@
  
          # If the curses module is enabled, check for the panel module
          if (module_enabled(exts, '_curses') and
@@ -126,7 +135,7 @@
          else:
              missing.append('_curses_panel')
  
-@@ -1324,8 +1354,13 @@
+@@ -1432,9 +1469,14 @@
              if macros.get('HAVE_SEM_OPEN', False):
                  multiprocessing_srcs.append('_multiprocessing/semaphore.c')
  
@@ -134,13 +143,14 @@
 +        if platform == 'sunos5':
 +            multiproc_libs = [ "xnet" ]
 +
-         exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
-                                  define_macros=macros.items(),
-+                                 libraries=multiproc_libs,
-                                  include_dirs=["Modules/_multiprocessing"]))
-         # End multiprocessing
- 
-@@ -1549,15 +1584,26 @@
+         if sysconfig.get_config_var('WITH_THREAD'):
+             exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+                                     define_macros=macros.items(),
++                                    libraries=multiproc_libs,
+                                     include_dirs=["Modules/_multiprocessing"]))
+         else:
+             missing.append('_multiprocessing')
+@@ -1674,12 +1716,23 @@
          # Assume we haven't found any of the libraries or include files
          # The versions with dots are used on Unix, and the versions without
          # dots on Windows, for detection by cygwin.
@@ -154,22 +164,19 @@
 -            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
 +            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version, tcl_tk_lib_dirs)
 +            tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version, tcl_tk_lib_dirs)
++            if tklib and tcllib:
++                # Exit the loop when we've found the Tcl/Tk libraries
++                break
++
++            tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version)
++            tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version)
              if tklib and tcllib:
++                # found the libs in a non-standard dir
++                added_lib_dirs.append(os.path.dirname(tcllib))
                  # Exit the loop when we've found the Tcl/Tk libraries
                  break
  
-+            tklib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tk' + version)
-+            tcllib = self.compiler.find_library_file(tcl_tk_lib_dirs, 'tcl' + version)
-+            if tklib and tcllib:
-+                # found the libs in a non-standard dir
-+                added_lib_dirs.append(os.path.dirname(tcllib))
-+                # Exit the loop when we've found the Tcl/Tk libraries
-+                break
-+
-         # Now check for the header files
-         if tklib and tcllib:
-             # Check for the include files on Debian and {Free,Open}BSD, where
-@@ -1572,6 +1618,7 @@
+@@ -1697,6 +1750,7 @@
              for dir in inc_dirs:
                  tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
                  tk_include_sub += [dir + os.sep + "tk" + dotversion]
@@ -177,7 +184,7 @@
              tk_include_sub += tcl_include_sub
              tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
              tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
-@@ -1636,6 +1683,7 @@
+@@ -1761,6 +1815,7 @@
                          include_dirs = include_dirs,
                          libraries = libs,
                          library_dirs = added_lib_dirs,
--- a/components/python/python26/patches/Python26-05-isalibs.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-05-isalibs.patch	Wed May 30 12:40:14 2012 -0700
@@ -13,9 +13,9 @@
 @@ -677,7 +679,13 @@
          so_ext = get_config_var('SO')
          if os.name == 'nt' and self.debug:
-             return apply(os.path.join, ext_path) + '_d' + so_ext
+             return os.path.join(*ext_path) + '_d' + so_ext
 -        return os.path.join(*ext_path) + so_ext
-+        # .so extensions are word-size specific
++	# .so extensions are word-size specific
 +        path = apply(os.path.join, ext_path)
 +        if sys.maxint == 2147483647L:
 +            return path + so_ext
@@ -28,15 +28,7 @@
 diff --git Python-2.6.4/Makefile.pre.in Python-2.6.4/Makefile.pre.in
 --- Python-2.6.4/Makefile.pre.in
 +++ Python-2.6.4/Makefile.pre.in
-@@ -87,18 +87,18 @@
- 
- # Expanded directories
- BINDIR=		$(exec_prefix)/bin
--LIBDIR=		$(exec_prefix)/lib
-+LIBDIR=		@libdir@
- MANDIR=		@mandir@
- INCLUDEDIR=	@includedir@
- CONFINCLUDEDIR=	$(exec_prefix)/include
+@@ -94,11 +94,11 @@
  SCRIPTDIR=	$(prefix)/lib
  
  # Detailed destination directories
@@ -56,7 +48,7 @@
 diff --git Python-2.6.4/Python/import.c Python-2.6.4/Python/import.c
 --- Python-2.6.4/Python/import.c
 +++ Python-2.6.4/Python/import.c
-@@ -1191,6 +1191,57 @@
+@@ -1193,6 +1193,57 @@
  static int find_init_module(char *); /* Forward */
  static struct filedescr importhookdescr = {"", "", IMP_HOOK};
  
@@ -113,65 +105,64 @@
 +
  static struct filedescr *
  find_module(char *fullname, char *subname, PyObject *path, char *buf,
- 	    size_t buflen, FILE **p_fp, PyObject **p_loader)
-@@ -1208,11 +1259,10 @@
- 	static struct filedescr fd_builtin = {"", "", C_BUILTIN};
- 	static struct filedescr fd_package = {"", "", PKG_DIRECTORY};
- 	char name[MAXPATHLEN+1];
+             size_t buflen, FILE **p_fp, PyObject **p_loader)
+@@ -1210,11 +1261,10 @@
+     static struct filedescr fd_builtin = {"", "", C_BUILTIN};
+     static struct filedescr fd_package = {"", "", PKG_DIRECTORY};
+     char name[MAXPATHLEN+1];
 -#if defined(PYOS_OS2)
- 	size_t saved_len;
- 	size_t saved_namelen;
- 	char *saved_buf = NULL;
+     size_t saved_len;
+     size_t saved_namelen;
+     char *saved_buf = NULL;
 -#endif
 +
- 	if (p_loader != NULL)
- 		*p_loader = NULL;
+     if (p_loader != NULL)
+         *p_loader = NULL;
  
-@@ -1431,15 +1481,19 @@
- 		}
+@@ -1433,15 +1483,18 @@
+         }
  #endif
  #endif
 -#if defined(PYOS_OS2)
 +
- 		/* take a snapshot of the module spec for restoration
- 		 * after the 8 character DLL hackery
- 		 */
- 		saved_buf = strdup(buf);
- 		saved_len = len;
- 		saved_namelen = namelen;
+         /* take a snapshot of the module spec for restoration
+          * after the 8 character DLL hackery
+          */
+         saved_buf = strdup(buf);
+         saved_len = len;
+         saved_namelen = namelen;
 -#endif /* PYOS_OS2 */
 +
- 		for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
+         for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
 +#ifdef HAVE_STAT
-+                        len += modify_path(fdp, buf, buflen);
++            len += modify_path(fdp, buf, buflen);
 +#endif
-+
  #if defined(PYOS_OS2) && defined(HAVE_DYNAMIC_LOADING)
- 			/* OS/2 limits DLLs to 8 character names (w/o
- 			   extension)
-@@ -1480,21 +1534,18 @@
- 					fp = NULL;
- 				}
- 			}
+             /* OS/2 limits DLLs to 8 character names (w/o
+                extension)
+@@ -1482,21 +1535,18 @@
+                     fp = NULL;
+                 }
+             }
 -#if defined(PYOS_OS2)
 +
- 			/* restore the saved snapshot */
- 			strcpy(buf, saved_buf);
- 			len = saved_len;
- 			namelen = saved_namelen;
+             /* restore the saved snapshot */
+             strcpy(buf, saved_buf);
+             len = saved_len;
+             namelen = saved_namelen;
 -#endif
- 		}
+         }
 -#if defined(PYOS_OS2)
- 		/* don't need/want the module name snapshot anymore */
- 		if (saved_buf)
- 		{
- 			free(saved_buf);
- 			saved_buf = NULL;
- 		}
+         /* don't need/want the module name snapshot anymore */
+         if (saved_buf)
+         {
+             free(saved_buf);
+             saved_buf = NULL;
+         }
 -#endif
- 		Py_XDECREF(copy);
- 		if (fp != NULL)
- 			break;
+         Py_XDECREF(copy);
+         if (fp != NULL)
+             break;
 diff --git Python-2.6.4/Python/importdl.h Python-2.6.4/Python/importdl.h
 --- Python-2.6.4/Python/importdl.h
 +++ Python-2.6.4/Python/importdl.h
@@ -262,7 +253,7 @@
  # Arguments passed to configure.
  AC_SUBST(CONFIG_ARGS)
  CONFIG_ARGS="$ac_configure_args"
-@@ -1377,14 +1433,10 @@
+@@ -1436,14 +1492,10 @@
  
  # Sizes of various common basic types
  # ANSI C requires sizeof(char) == 1, so no need to check it
@@ -278,7 +269,7 @@
  AC_CHECK_SIZEOF(pid_t, 4)
  
  AC_MSG_CHECKING(for long long support)
-@@ -1394,9 +1446,6 @@
+@@ -1453,9 +1505,6 @@
    have_long_long=yes
  ])
  AC_MSG_RESULT($have_long_long)
@@ -288,7 +279,7 @@
  
  AC_MSG_CHECKING(for long double support)
  have_long_double=no
-@@ -1404,10 +1453,6 @@
+@@ -1463,10 +1512,6 @@
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
    have_long_double=yes
  ])
@@ -299,12 +290,12 @@
  
  AC_MSG_CHECKING(for _Bool support)
  have_c99_bool=no
-@@ -1421,102 +1466,26 @@
+@@ -1480,106 +1525,25 @@
  fi
  
  AC_CHECK_TYPES(uintptr_t, 
 -   [AC_CHECK_SIZEOF(uintptr_t, 4)], 
-+   [], 
++   [],
     [], [#ifdef HAVE_STDINT_H
          #include <stdint.h>
          #endif])
@@ -328,14 +319,15 @@
 -ac_cv_sizeof_off_t=`cat conftestval`,
 -ac_cv_sizeof_off_t=0,
 -ac_cv_sizeof_off_t=4)
- ])
+-])
 -AC_MSG_RESULT($ac_cv_sizeof_off_t)
 -AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
 -[The number of bytes in an off_t.])
- 
- AC_MSG_CHECKING(whether to enable large file support)
--if test "$have_long_long" = yes -a \
--	"$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
+-
+-AC_MSG_CHECKING(whether to enable large file support)
+-if test "$have_long_long" = yes
+-then
+-if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
 -	"$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
 -  AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, 
 -  [Defined to enable large file support when an off_t is bigger than a long
@@ -346,7 +338,10 @@
 -else
 -  AC_MSG_RESULT(no)
 -fi
- 
+-else
+-  AC_MSG_RESULT(no)
+-fi
+-
 -# AC_CHECK_SIZEOF() doesn't include <time.h>.
 -AC_MSG_CHECKING(size of time_t)
 -AC_CACHE_VAL(ac_cv_sizeof_time_t,
@@ -362,12 +357,12 @@
 -ac_cv_sizeof_time_t=`cat conftestval`,
 -ac_cv_sizeof_time_t=0,
 -ac_cv_sizeof_time_t=4)
--])
+ ])
 -AC_MSG_RESULT($ac_cv_sizeof_time_t)
 -AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, 
 -[The number of bytes in a time_t.])
 -
--
+ 
 -# if have pthread_t then define SIZEOF_PTHREAD_T
 -ac_save_cc="$CC"
 -if test "$ac_cv_kpthread" = "yes"
@@ -403,6 +398,7 @@
 -   [The number of bytes in a pthread_t.])
 -fi
 -CC="$ac_save_cc"
++AC_MSG_CHECKING(whether to enable large file support)
 +AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
 +[Defined to enable large file support when an off_t is bigger than a long
 + and long long is available and at least as big as an off_t. You may need
@@ -412,7 +408,7 @@
  
  AC_MSG_CHECKING(for --enable-toolbox-glue)
  AC_ARG_ENABLE(toolbox-glue,
-@@ -1810,12 +1779,6 @@
+@@ -1873,12 +1837,6 @@
  if test -z "$CCSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
@@ -425,7 +421,7 @@
  	hp*|HP*) if test "$GCC" = yes;
  		 then CCSHARED="-fPIC";
  		 else CCSHARED="+z";
-@@ -3308,12 +3271,6 @@
+@@ -3383,12 +3341,6 @@
  wchar_h="no"
  )
  
@@ -438,7 +434,7 @@
  AC_MSG_CHECKING(for UCS-4 tcl)
  have_ucs4_tcl=no
  AC_TRY_COMPILE([
-@@ -3344,6 +3301,11 @@
+@@ -3419,6 +3371,11 @@
    ac_cv_wchar_t_signed=no,
    ac_cv_wchar_t_signed=yes)])
    AC_MSG_RESULT($ac_cv_wchar_t_signed)
--- a/components/python/python26/patches/Python26-06-write_compiled_module-atomic.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-06-write_compiled_module-atomic.patch	Wed May 30 12:40:14 2012 -0700
@@ -1,7 +1,7 @@
 diff --git Python-2.6.4/Python/import.c Python-2.6.4/Python/import.c
 --- Python-2.6.4/Python/import.c
 +++ Python-2.6.4/Python/import.c
-@@ -866,8 +866,9 @@
+@@ -868,8 +868,9 @@
  
  /* Write a compiled module to a file, placing the time of last
     modification of its source into the header.
@@ -13,72 +13,71 @@
  
  static void
  write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
-@@ -879,12 +880,21 @@
- #else
- 	mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH;
- #endif 
-+	char *tmppathname;
-+ 
-+	/* the temporary file is called cpathname + ".tmp" */
-+	if ((tmppathname = PyMem_Malloc(strlen(cpathname) + strlen(".tmp") + 1))
-+		== NULL) {
-+		return;
-+	}
-+	sprintf (tmppathname, "%s.tmp", cpathname);
-+	fp = open_exclusive(tmppathname, mode);
+@@ -882,11 +883,21 @@
+     mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH;
+ #endif
  
--	fp = open_exclusive(cpathname, mode);
- 	if (fp == NULL) {
- 		if (Py_VerboseFlag)
- 			PySys_WriteStderr(
--				"# can't create %s\n", cpathname);
-+				"# can't create %s\n", tmppathname);
-+		PyMem_Free(tmppathname);
- 		return;
- 	}
- 	PyMarshal_WriteLongToFile(pyc_magic, fp, Py_MARSHAL_VERSION);
-@@ -893,10 +903,11 @@
- 	PyMarshal_WriteObjectToFile((PyObject *)co, fp, Py_MARSHAL_VERSION);
- 	if (fflush(fp) != 0 || ferror(fp)) {
- 		if (Py_VerboseFlag)
--			PySys_WriteStderr("# can't write %s\n", cpathname);
-+			PySys_WriteStderr("# can't write %s\n", tmppathname);
- 		/* Don't keep partial file */
- 		fclose(fp);
--		(void) unlink(cpathname);
-+		(void) unlink(tmppathname);
-+		PyMem_Free(tmppathname);
- 		return;
- 	}
- 	/* Now write the true mtime */
-@@ -905,8 +916,30 @@
- 	PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION);
- 	fflush(fp);
- 	fclose(fp);
-+	/* Delete the old compiled file, if exists */
-+	if (unlink (cpathname)) {
-+		if ((errno != ENOENT)) {
-+			/* the file exists but could not be deleted */
-+			if (Py_VerboseFlag)
-+				PySys_WriteStderr(
-+					"# can't unlink %s\n", cpathname);
-+			(void) unlink(tmppathname);
-+			PyMem_Free(tmppathname);
-+			return;
-+		}
-+	}
-+	/* rename the tmp file to the real file name */
-+	if (rename (tmppathname, cpathname)) {
-+		if (Py_VerboseFlag)
-+			PySys_WriteStderr(
-+				"# can't rename %s to %s\n", tmppathname, cpathname);
-+		(void) unlink(tmppathname);
-+		PyMem_Free(tmppathname);
-+		return;
-+	}
- 	if (Py_VerboseFlag)
- 		PySys_WriteStderr("# wrote %s\n", cpathname);
-+	PyMem_Free(tmppathname);
+-    fp = open_exclusive(cpathname, mode);
++    char *tmppathname;
++
++    /* the temporary file is called cpathname + ".tmp" */
++    if ((tmppathname = PyMem_Malloc(strlen(cpathname) + strlen(".tmp") + 1))
++        == NULL) {
++        return;
++    }
++    sprintf (tmppathname, "%s.tmp", cpathname);
++    fp = open_exclusive(tmppathname, mode);
++
+     if (fp == NULL) {
+         if (Py_VerboseFlag)
+             PySys_WriteStderr(
+-                "# can't create %s\n", cpathname);
++                "# can't create %s\n", tmppathname);
++        PyMem_Free(tmppathname);
+         return;
+     }
+     PyMarshal_WriteLongToFile(pyc_magic, fp, Py_MARSHAL_VERSION);
+@@ -895,10 +906,11 @@
+     PyMarshal_WriteObjectToFile((PyObject *)co, fp, Py_MARSHAL_VERSION);
+     if (fflush(fp) != 0 || ferror(fp)) {
+         if (Py_VerboseFlag)
+-            PySys_WriteStderr("# can't write %s\n", cpathname);
++            PySys_WriteStderr("# can't write %s\n", tmppathname);
+         /* Don't keep partial file */
+         fclose(fp);
+-        (void) unlink(cpathname);
++        (void) unlink(tmppathname);
++        PyMem_Free(tmppathname);
+         return;
+     }
+     /* Now write the true mtime */
+@@ -907,8 +919,29 @@
+     PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION);
+     fflush(fp);
+     fclose(fp);
++    /* Delete the old compiled file, if exists */
++    if (unlink (cpathname)) {
++        if ((errno != ENOENT)) {
++            /* the file exists but could not be deleted */
++            if (Py_VerboseFlag)
++                PySys_WriteStderr("# can't unlink %s\n", cpathname);
++            (void) unlink(tmppathname);
++            PyMem_Free(tmppathname);
++            return;
++        }
++    }
++    /* rename the tmp file to the real file name */
++    if (rename (tmppathname, cpathname)) {
++        if (Py_VerboseFlag)
++            PySys_WriteStderr(
++                "# can't rename %s to %s\n", tmppathname, cpathname);
++        (void) unlink(tmppathname);
++        PyMem_Free(tmppathname);
++        return;
++    }
+     if (Py_VerboseFlag)
+         PySys_WriteStderr("# wrote %s\n", cpathname);
++    PyMem_Free(tmppathname);
  }
  
  static void
--- a/components/python/python26/patches/Python26-07-dtrace.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-07-dtrace.patch	Wed May 30 12:40:14 2012 -0700
@@ -51,12 +51,12 @@
 --- Python-2.6.4/Objects/frameobject.c
 +++ Python-2.6.4/Objects/frameobject.c
 @@ -698,6 +698,7 @@
- 	f->f_tstate = tstate;
+     f->f_tstate = tstate;
  
- 	f->f_lasti = -1;
-+ 	f->f_calllineno = code->co_firstlineno;
- 	f->f_lineno = code->co_firstlineno;
- 	f->f_iblock = 0;
+     f->f_lasti = -1;
++    f->f_calllineno = code->co_firstlineno;
+     f->f_lineno = code->co_firstlineno;
+     f->f_iblock = 0;
  
 diff --git Python-2.6.4/Python/ceval.c Python-2.6.4/Python/ceval.c
 --- Python-2.6.4/Python/ceval.c
@@ -73,8 +73,8 @@
  #ifndef WITH_TSC
  
  #define READ_TIMESTAMP(var)
-@@ -527,6 +532,55 @@
- 			  NULL);
+@@ -546,6 +551,55 @@
+                       NULL);
  }
  
 +#ifdef HAVE_DTRACE
@@ -129,8 +129,8 @@
  
  /* Interpreter main loop */
  
-@@ -538,9 +592,84 @@
- 	return PyEval_EvalFrameEx(f, 0);
+@@ -557,9 +611,84 @@
+     return PyEval_EvalFrameEx(f, 0);
  }
  
 +/*
@@ -212,49 +212,48 @@
 +#endif /* HAVE_DTRACE */
 +
  #ifdef DXPAIRS
- 	int lastopcode = 0;
+     int lastopcode = 0;
  #endif
-@@ -763,6 +892,9 @@
- 		}
- 	}
+@@ -782,6 +911,9 @@
+         }
+     }
  
-+        if (PYTHON_FUNCTION_ENTRY_ENABLED())
-+                dtrace_entry(f);
++    if (PYTHON_FUNCTION_ENTRY_ENABLED())
++        dtrace_entry(f);
 +
- 	co = f->f_code;
- 	names = co->co_names;
- 	consts = co->co_consts;
-@@ -2383,6 +2515,10 @@
- 			PyObject **sp;
- 			PCALL(PCALL_ALL);
- 			sp = stack_pointer;
+     co = f->f_code;
+     names = co->co_names;
+     consts = co->co_consts;
+@@ -2406,6 +2538,10 @@
+             PyObject **sp;
+             PCALL(PCALL_ALL);
+             sp = stack_pointer;
 +#ifdef HAVE_DTRACE
-+			f->f_calllineno = PyCode_Addr2Line(f->f_code,
-+							   f->f_lasti);
++            f->f_calllineno = PyCode_Addr2Line(f->f_code,
++                                               f->f_lasti);
 +#endif
  #ifdef WITH_TSC
- 			x = call_function(&sp, oparg, &intr0, &intr1);
+             x = call_function(&sp, oparg, &intr0, &intr1);
  #else
-@@ -2425,6 +2561,11 @@
- 		    } else
- 			    Py_INCREF(func);
- 		    sp = stack_pointer;
+@@ -2448,6 +2584,10 @@
+             } else
+                 Py_INCREF(func);
+             sp = stack_pointer;
 +#ifdef HAVE_DTRACE
-+		    f->f_calllineno = PyCode_Addr2Line(f->f_code,
-+		                                       f->f_lasti);
++            f->f_calllineno = PyCode_Addr2Line(f->f_code,
++                                               f->f_lasti);
 +#endif
-+
- 		    READ_TIMESTAMP(intr0);
- 		    x = ext_do_call(func, &sp, flags, na, nk);
- 		    READ_TIMESTAMP(intr1);
-@@ -2723,6 +2864,8 @@
+             READ_TIMESTAMP(intr0);
+             x = ext_do_call(func, &sp, flags, na, nk);
+             READ_TIMESTAMP(intr1);
+@@ -2746,6 +2886,8 @@
  
- 	/* pop frame */
+     /* pop frame */
  exit_eval_frame:
-+	if (PYTHON_FUNCTION_RETURN_ENABLED())
-+		dtrace_return(f);
- 	Py_LeaveRecursiveCall();
- 	tstate->frame = f->f_back;
++    if (PYTHON_FUNCTION_RETURN_ENABLED())
++        dtrace_return(f);
+     Py_LeaveRecursiveCall();
+     tstate->frame = f->f_back;
  
 diff --git Python-2.6.4/Python/phelper.d Python-2.6.4/Python/phelper.d
 new file mode 100644
--- a/components/python/python26/patches/Python26-15-getcwd.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-15-getcwd.patch	Wed May 30 12:40:14 2012 -0700
@@ -1,21 +1,21 @@
 diff --git Python-2.6.4/Modules/posixmodule.c Python-2.6.4/Modules/posixmodule.c
 --- Python-2.6.4/Modules/posixmodule.c
 +++ Python-2.6.4/Modules/posixmodule.c
-@@ -1978,6 +1978,8 @@
- 	char *res = NULL;
- 	PyObject *dynamic_return;
+@@ -1997,6 +1997,8 @@
+     char *res = NULL;
+     PyObject *dynamic_return;
  
-+	int maxsize = pathconf(".", _PC_PATH_MAX);
++    int maxsize = pathconf(".", _PC_PATH_MAX);
 +
- 	Py_BEGIN_ALLOW_THREADS
- 	do {
- 		bufsize = bufsize + bufsize_incr;
-@@ -1994,7 +1996,7 @@
- 		if (res == NULL) {
- 			free(tmpbuf);
- 		}
--	} while ((res == NULL) && (errno == ERANGE));
-+	} while ((res == NULL) && (errno == ERANGE) && (bufsize < maxsize));
- 	Py_END_ALLOW_THREADS
+     Py_BEGIN_ALLOW_THREADS
+     do {
+         bufsize = bufsize + bufsize_incr;
+@@ -2013,7 +2015,7 @@
+         if (res == NULL) {
+             free(tmpbuf);
+         }
+-    } while ((res == NULL) && (errno == ERANGE));
++    } while ((res == NULL) && (errno == ERANGE) && (bufsize < maxsize));
+     Py_END_ALLOW_THREADS
  
- 	if (res == NULL)
+     if (res == NULL)
--- a/components/python/python26/patches/Python26-17-netpacket-packet-h.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-17-netpacket-packet-h.patch	Wed May 30 12:40:14 2012 -0700
@@ -16,39 +16,39 @@
  #ifdef __APPLE__
    /*
     * inet_aton is not available on OSX 10.3, yet we want to use a binary
-@@ -1092,7 +1100,7 @@
- 		}
+@@ -1096,7 +1104,7 @@
+         }
  #endif
  
 -#ifdef HAVE_NETPACKET_PACKET_H
 +#if USE_NETPACKET_PACKET_H
- 	case AF_PACKET:
- 	{
- 		struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
-@@ -1382,7 +1390,7 @@
- 	}
+     case AF_PACKET:
+     {
+         struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
+@@ -1387,7 +1395,7 @@
+     }
  #endif
  
 -#ifdef HAVE_NETPACKET_PACKET_H
 +#if USE_NETPACKET_PACKET_H
- 	case AF_PACKET:
- 	{
- 		struct sockaddr_ll* addr;
-@@ -1559,7 +1567,7 @@
- 	}
+     case AF_PACKET:
+     {
+         struct sockaddr_ll* addr;
+@@ -1564,7 +1572,7 @@
+     }
  #endif
  
 -#ifdef HAVE_NETPACKET_PACKET_H
 +#if USE_NETPACKET_PACKET_H
- 	case AF_PACKET:
- 	{
- 		*len_ret = sizeof (struct sockaddr_ll);
-@@ -4578,7 +4586,7 @@
- 	PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
+     case AF_PACKET:
+     {
+         *len_ret = sizeof (struct sockaddr_ll);
+@@ -4599,7 +4607,7 @@
+     PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
  #endif
  
 -#ifdef HAVE_NETPACKET_PACKET_H
 +#if USE_NETPACKET_PACKET_H
- 	PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
- 	PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
- 	PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);
+     PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
+     PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
+     PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);
--- a/components/python/python26/patches/Python26-21-getpass.patch	Wed May 30 10:46:29 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-diff --git Python-2.6.4/Lib/getpass.py Python-2.6.4/Lib/getpass.py
---- Python-2.6.4/Lib/getpass.py
-+++ Python-2.6.4/Lib/getpass.py
-@@ -62,12 +62,16 @@
-         try:
-             old = termios.tcgetattr(fd)     # a copy to save
-             new = old[:]
--            new[3] &= ~termios.ECHO  # 3 == 'lflags'
-+            new[3] &= ~(termios.ECHO|termios.ISIG)  # 3 == 'lflags'
-+            tcsetattr_flags = termios.TCSAFLUSH
-+            if hasattr(termios, 'TCSASOFT'):
-+                tcsetattr_flags |= termios.TCSASOFT
-             try:
--                termios.tcsetattr(fd, termios.TCSADRAIN, new)
-+                termios.tcsetattr(fd, tcsetattr_flags, new)
-                 passwd = _raw_input(prompt, stream, input=input)
-             finally:
--                termios.tcsetattr(fd, termios.TCSADRAIN, old)
-+                termios.tcsetattr(fd, tcsetattr_flags, old)
-+                stream.flush()  # issue7208
-         except termios.error, e:
-             if passwd is not None:
-                 # _raw_input succeeded.  The final tcsetattr failed.  Reraise
-@@ -125,6 +129,7 @@
-     if prompt:
-         stream.write(prompt)
-         stream.flush()
-+    # NOTE: The Python C API calls flockfile() (and unlock) during readline.
-     line = input.readline()
-     if not line:
-         raise EOFError
--- a/components/python/python26/patches/Python26-22-bindir.patch	Wed May 30 10:46:29 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- Python-2.6.4/Makefile.pre.in.orig	Fri Feb 11 11:35:54 2011
-+++ Python-2.6.4/Makefile.pre.in	Fri Feb 11 11:36:15 2011
-@@ -86,7 +86,7 @@
- datarootdir=    @datarootdir@
- 
- # Expanded directories
--BINDIR=		$(exec_prefix)/bin
-+BINDIR=		@bindir@
- LIBDIR=		@libdir@
- MANDIR=		@mandir@
- INCLUDEDIR=	@includedir@
--- a/components/python/python26/patches/Python26-23-none-on-connect.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-23-none-on-connect.patch	Wed May 30 12:40:14 2012 -0700
@@ -1,40 +1,6 @@
---- Python-2.6.4/Lib/smtpd.py	Thu Aug  4 09:36:51 2011
-+++ Python-2.6.4/Lib/new.smtpd.py	Thu Aug  4 09:51:49 2011
-@@ -121,7 +121,15 @@
-         self.__rcpttos = []
-         self.__data = ''
-         self.__fqdn = socket.getfqdn()
--        self.__peer = conn.getpeername()
-+        try:
-+            self.__peer = conn.getpeername()
-+        except socket.error as err:
-+            # a race condition  may occur if the other end is closing
-+            # before we can get the peername
-+            self.close()
-+            if err.args[0] != errno.ENOTCONN:
-+                raise
-+            return
-         print >> DEBUGSTREAM, 'Peer:', repr(self.__peer)
-         self.push('220 %s %s' % (self.__fqdn, __version__))
-         self.set_terminator('\r\n')
-@@ -285,9 +293,11 @@
-             localaddr, remoteaddr)
- 
-     def handle_accept(self):
--        conn, addr = self.accept()
--        print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr)
--        channel = SMTPChannel(self, conn, addr)
-+        pair = self.accept()
-+        if pair is not None:
-+            conn, addr = pair
-+            print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr)
-+            channel = SMTPChannel(self, conn, addr)
- 
-     # API for "doing something useful with the message"
-     def process_message(self, peer, mailfrom, rcpttos, data):
 --- Python-2.6.4/Lib/asyncore.py	Wed Apr 15 16:00:41 2009
 +++ Python-2.6.4/Lib/new.asyncore.py	Thu Aug  4 09:55:22 2011
-@@ -340,12 +340,15 @@
+@@ -348,12 +348,15 @@
          # XXX can return either an address pair or None
          try:
              conn, addr = self.socket.accept()
@@ -56,7 +22,7 @@
          try:
 --- Python-2.6.4/Doc/library/asyncore.rst	Wed Apr 15 16:00:41 2009
 +++ Python-2.6.4/Doc/library/new.asyncore.rst	Thu Aug  4 10:05:40 2011
-@@ -210,10 +210,13 @@
+@@ -211,10 +211,13 @@
     .. method:: accept()
  
        Accept a connection.  The socket must be bound to an address and listening
@@ -74,7 +40,7 @@
  
  
     .. method:: close()
-@@ -223,6 +226,12 @@
+@@ -223,6 +229,12 @@
        flushed).  Sockets are automatically closed when they are
        garbage-collected.
  
@@ -87,7 +53,7 @@
  .. class:: file_dispatcher()
  
     A file_dispatcher takes a file descriptor or file object along with an
-@@ -239,7 +248,7 @@
+@@ -239,7 +250,7 @@
     socket for use by the :class:`file_dispatcher` class.  Availability: UNIX.
  
  
@@ -96,7 +62,7 @@
  
  asyncore Example basic HTTP client
  ----------------------------------
-@@ -249,7 +258,7 @@
+@@ -249,7 +260,7 @@
  
     import asyncore, socket
  
@@ -105,7 +71,7 @@
  
         def __init__(self, host, path):
             asyncore.dispatcher.__init__(self)
-@@ -273,6 +282,45 @@
+@@ -273,6 +284,45 @@
             sent = self.send(self.buffer)
             self.buffer = self.buffer[sent:]
  
--- a/components/python/python26/patches/Python26-24-makedev.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-24-makedev.patch	Wed May 30 12:40:14 2012 -0700
@@ -1,12 +1,19 @@
---- Python-2.6.4/configure.in	Thu Oct  6 14:37:11 2011
-+++ Python-2.6.4/configure.in	Thu Oct 20 14:46:16 2011
-@@ -1362,29 +1362,9 @@
+--- Python-2.6.8/configure.in.orig	2012-05-14 06:24:15.149791072 -0700
++++ Python-2.6.8/configure.in	2012-05-14 06:27:52.383479003 -0700
+@@ -1416,36 +1416,9 @@
  ])
  AC_MSG_RESULT($was_it_defined)
  
 -# Check whether using makedev requires defining _OSF_SOURCE
 -AC_MSG_CHECKING(for makedev)
--AC_TRY_LINK([#include <sys/types.h> ],
+-AC_TRY_LINK([
+-#if defined(MAJOR_IN_MKDEV)
+-#include <sys/mkdev.h>
+-#elif defined(MAJOR_IN_SYSMACROS)
+-#include <sys/sysmacros.h>
+-#else
+-#include <sys/types.h>
+-#endif ],
 -	    [ makedev(0, 0) ],
 -	    ac_cv_has_makedev=yes,
 -	    ac_cv_has_makedev=no)
--- a/components/python/python26/patches/Python26-25-closerange.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-25-closerange.patch	Wed May 30 12:40:14 2012 -0700
@@ -1,39 +1,39 @@
---- Python-2.6.4/Modules/posixmodule.c	Wed Sep 16 13:06:36 2009
-+++ Python-2.6.4/Modules/posixmodule.c	Thu Nov  3 17:39:15 2011
-@@ -6295,15 +6297,34 @@
+--- Python-2.6.8/Modules/posixmodule.c.orig	2012-05-14 06:31:28.561995103 -0700
++++ Python-2.6.8/Modules/posixmodule.c	2012-05-14 06:34:39.031503970 -0700
+@@ -6378,15 +6378,34 @@
  "closerange(fd_low, fd_high)\n\n\
  Closes all file descriptors in [fd_low, fd_high), ignoring errors.");
  
 +static int
 +close_func(void *lohi, int fd)
 +{
-+	int lo = ((int *)lohi)[0];
-+	int hi = ((int *)lohi)[1];
++    int lo = ((int *)lohi)[0];
++    int hi = ((int *)lohi)[1];
 +
-+	if (fd >= hi)
-+		return (1);
-+	else if (fd >= lo)
-+		close(fd);
++    if (fd >= hi)
++        return (1);
++    else if (fd >= lo)
++        close(fd);
 +
-+	return (0);
++    return (0);
 +}
 +
  static PyObject *
  posix_closerange(PyObject *self, PyObject *args)
  {
- 	int fd_from, fd_to, i;
-+	int lohi[2];
+     int fd_from, fd_to, i;
++    int lohi[2];
 +
- 	if (!PyArg_ParseTuple(args, "ii:closerange", &fd_from, &fd_to))
- 		return NULL;
- 	Py_BEGIN_ALLOW_THREADS
--	for (i = fd_from; i < fd_to; i++)
--		close(i);
+     if (!PyArg_ParseTuple(args, "ii:closerange", &fd_from, &fd_to))
+         return NULL;
+     Py_BEGIN_ALLOW_THREADS
+-    for (i = fd_from; i < fd_to; i++)
+-        close(i);
 +
-+	lohi[0] = fd_from;
-+	lohi[1] = fd_to;
-+	fdwalk(close_func, lohi);
++    lohi[0] = fd_from;
++    lohi[1] = fd_to;
++    fdwalk(close_func, lohi);
 +
- 	Py_END_ALLOW_THREADS
- 	Py_RETURN_NONE;
+     Py_END_ALLOW_THREADS
+     Py_RETURN_NONE;
  }
--- a/components/python/python26/patches/Python26-25-studio-profile.patch	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/patches/Python26-25-studio-profile.patch	Wed May 30 12:40:14 2012 -0700
@@ -3,9 +3,9 @@
 is a workaround for build peculiarities and to meet Studio's requirement
 that the profiling options be used at all steps of the build -- not just
 compilation.
---- Python-2.6.4/Makefile.pre.in.old	Thu Nov  3 15:14:03 2011
-+++ Python-2.6.4/Makefile.pre.in	Thu Nov  3 15:14:11 2011
-@@ -360,9 +360,9 @@
+--- Python-2.6.4/Makefile.pre.in.orig	2012-05-14 06:37:59.575335093 -0700
++++ Python-2.6.4/Makefile.pre.in	2012-05-14 06:41:08.439443308 -0700
+@@ -361,27 +361,36 @@
  profile-opt:
  	@echo "Building with support for profile generation:"
  	$(MAKE) clean
@@ -16,7 +16,6 @@
  	$(MAKE) run_profile_task
  	@echo "Rebuilding with profile guided optimizations:"
  	$(MAKE) clean
-@@ -369,18 +369,27 @@
  	$(MAKE) build_all_use_profile
  
  build_all_generate_profile:
@@ -48,29 +47,30 @@
  
  
  # Build the interpreter
-@@ -395,10 +404,7 @@
+@@ -396,10 +405,7 @@
  
  # Build the shared modules
  sharedmods: $(BUILDPYTHON)
 -	@case $$MAKEFLAGS in \
--	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
--	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+-	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+-	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
 -	esac
 +	$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build
  
  # Build static library
  # avoid long command lines, same as LIBRARY_OBJS
-@@ -1168,12 +1174,13 @@
+@@ -1170,6 +1176,7 @@
  clean: pycremoval
- 	find . -name '*.o' -exec rm -f {} ';'
+ 	find . -name '*.[oa]' -exec rm -f {} ';'
  	find . -name '*.s[ol]' -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
- 	-rm -f Lib/lib2to3/*Grammar*.pickle
+ 	find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
+@@ -1177,6 +1184,7 @@
  
  profile-removal:
--	find . -name '*.gc??' -exec rm -f {} ';'
+ 	find . -name '*.gc??' -exec rm -f {} ';'
 +	find . -name '.profile' -exec rm -rf {} ';'
  
  clobber: clean profile-removal
--- a/components/python/python26/python-26.p5m	Wed May 30 10:46:29 2012 -0700
+++ b/components/python/python26/python-26.p5m	Wed May 30 12:40:14 2012 -0700
@@ -662,7 +662,7 @@
 file path=usr/lib/python2.6/lib-dynload/64/ucred.so
 file path=usr/lib/python2.6/lib-dynload/64/unicodedata.so
 file path=usr/lib/python2.6/lib-dynload/64/zlib.so
-file path=usr/lib/python2.6/lib-dynload/Python-2.6.4-py2.6.egg-info
+file path=usr/lib/python2.6/lib-dynload/Python-$(COMPONENT_VERSION)-py2.6.egg-info
 file path=usr/lib/python2.6/lib-dynload/_bisect.so
 file path=usr/lib/python2.6/lib-dynload/_bytesio.so
 file path=usr/lib/python2.6/lib-dynload/_codecs_cn.so
@@ -732,9 +732,9 @@
 file path=usr/lib/python2.6/lib-dynload/unicodedata.so
 file path=usr/lib/python2.6/lib-dynload/zlib.so
 file path=usr/lib/python2.6/lib2to3/Grammar.txt
-file path=usr/lib/python2.6/lib2to3/Grammar2.6.4.final.0.pickle
+file path=usr/lib/python2.6/lib2to3/Grammar$(COMPONENT_VERSION).final.0.pickle
 file path=usr/lib/python2.6/lib2to3/PatternGrammar.txt
-file path=usr/lib/python2.6/lib2to3/PatternGrammar2.6.4.final.0.pickle
+file path=usr/lib/python2.6/lib2to3/PatternGrammar$(COMPONENT_VERSION).final.0.pickle
 file path=usr/lib/python2.6/lib2to3/__init__.py
 file path=usr/lib/python2.6/lib2to3/fixer_base.py
 file path=usr/lib/python2.6/lib2to3/fixer_util.py
@@ -747,6 +747,7 @@
 file path=usr/lib/python2.6/lib2to3/fixes/fix_except.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_exec.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_execfile.py
+file path=usr/lib/python2.6/lib2to3/fixes/fix_exitfunc.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_filter.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_funcattrs.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_future.py
@@ -769,6 +770,7 @@
 file path=usr/lib/python2.6/lib2to3/fixes/fix_next.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_nonzero.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_numliterals.py
+file path=usr/lib/python2.6/lib2to3/fixes/fix_operator.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_paren.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_print.py
 file path=usr/lib/python2.6/lib2to3/fixes/fix_raise.py