--- old/build/dtrace-toolkit/build.sh	Mon Jan  9 12:11:33 2017
+++ new/build/dtrace-toolkit/build.sh	Mon Jan  9 12:11:33 2017
@@ -33,7 +33,7 @@
 SUMMARY="$PROG ($VER)"
 DESC="$PROG - a collection of over 200 useful and documented DTrace scripts"
 
-DEPENDS_IPS="developer/dtrace runtime/perl runtime/python-26"
+DEPENDS_IPS="developer/dtrace runtime/perl runtime/python-27"
 
 PREFIX=/opt/DTT
 
--- old/build/entire/entire.p5m	Mon Jan  9 12:11:33 2017
+++ new/build/entire/entire.p5m	Mon Jan  9 12:11:33 2017
@@ -142,27 +142,16 @@
 depend fmri=library/nghttp2@1.15.0,5.11-@PVER@ type=require
 depend fmri=library/nspr@4.12,5.11-@PVER@ type=require
 depend fmri=library/pcre@8.39,5.11-@PVER@ type=require
-depend fmri=library/python-2/cherrypy-26@3.2.2,5.11-@PVER@ type=require
 depend fmri=library/python-2/cherrypy-27@3.2.2,5.11-@PVER@ type=require
-depend fmri=library/python-2/m2crypto-26@0.24,5.11-@PVER@ type=require
 depend fmri=library/python-2/m2crypto-27@0.24,5.11-@PVER@ type=require
-depend fmri=library/python-2/mako-26@1.0,5.11-@PVER@ type=require
 depend fmri=library/python-2/mako-27@1.0,5.11-@PVER@ type=require
-depend fmri=library/python-2/numpy-26@1.11,5.11-@PVER@ type=require
 depend fmri=library/python-2/numpy-27@1.11,5.11-@PVER@ type=require
-depend fmri=library/python-2/ply-26@3.9,5.11-@PVER@ type=require
 depend fmri=library/python-2/ply-27@3.9,5.11-@PVER@ type=require
-depend fmri=library/python-2/pybonjour-26@1.1.1,5.11-@PVER@ type=require
 depend fmri=library/python-2/pybonjour-27@1.1.1,5.11-@PVER@ type=require
-depend fmri=library/python-2/pycurl-26@7.43,5.11-@PVER@ type=require
 depend fmri=library/python-2/pycurl-27@7.43,5.11-@PVER@ type=require
-depend fmri=library/python-2/pyopenssl-26@0.11,5.11-@PVER@ type=require
 depend fmri=library/python-2/pyopenssl-27@0.11,5.11-@PVER@ type=require
-depend fmri=library/python-2/pyrex-26@0.9.9,5.11-@PVER@ type=require
 depend fmri=library/python-2/pyrex-27@0.9.9,5.11-@PVER@ type=require
-depend fmri=library/python-2/setuptools-26@0.6.11,5.11-@PVER@ type=require
 depend fmri=library/python-2/setuptools-27@0.6.11,5.11-@PVER@ type=require
-depend fmri=library/python-2/simplejson-26@3.8,5.11-@PVER@ type=require
 depend fmri=library/python-2/simplejson-27@3.8,5.11-@PVER@ type=require
 depend fmri=library/readline@7.0,5.11-@PVER@ type=require
 depend fmri=library/security/openssl@1.0.2,5.11-@PVER@ type=require
@@ -286,7 +275,7 @@
 depend fmri=runtime/perl@5.16.1,5.11-@PVER@ type=require
 depend fmri=runtime/perl/manual@5.16.1,5.11-@PVER@ type=require
 depend fmri=runtime/perl/module/sun-solaris@0.5.11,5.11-@PVER@ type=require
-depend fmri=runtime/python-26@2.6.8,5.11-@PVER@ type=require
+depend fmri=runtime/python-27@2.7,5.11-@PVER@ type=require
 depend fmri=security/sudo@1.8,5.11-@PVER@ type=require
 depend fmri=service/fault-management@0.5.11,5.11-@PVER@ type=require
 depend fmri=service/file-system/nfs@0.5.11,5.11-@PVER@ type=require
--- old/build/fio/patches/fio2gnuplot.patch	Mon Jan  9 12:11:33 2017
+++ new/build/fio/patches/fio2gnuplot.patch	Mon Jan  9 12:11:33 2017
@@ -3,7 +3,7 @@
 +++ fio-2.1.10/tools/plot/fio2gnuplot	2014-07-29 13:02:35.000000000 -0400
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
-+#!/usr/bin/python2.6
++#!/usr/bin/python
  #
  #  Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
  #  Author: Erwan Velu  <erwan@enovance.com>
--- old/build/git/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/git/build.sh	Mon Jan  9 12:11:34 2017
@@ -36,7 +36,7 @@
 
 BUILD_DEPENDS_IPS="compatibility/ucb developer/build/autoconf archiver/gnu-tar"
 
-DEPENDS_IPS="runtime/python-26 \
+DEPENDS_IPS="runtime/python-27 \
              web/curl \
              library/security/openssl@1.0.2 \
              library/zlib"
@@ -46,8 +46,10 @@
 # For inet_ntop which isn't detected properly in the configure script
 LDFLAGS="-lnsl"
 CFLAGS64="$CFLAGS64 -I/usr/include/amd64"
+# Explicitly call out python version to make future python version bumps
+# smoother.
 CONFIGURE_OPTS="--without-tcltk
-    --with-python=/usr/bin/python
+    --with-python=/usr/bin/python2.7
     --with-curl=/usr
     --with-openssl=/usr"
 
--- old/build/illumos-tools/illumos-tools.p5m	Mon Jan  9 12:11:34 2017
+++ new/build/illumos-tools/illumos-tools.p5m	Mon Jan  9 12:11:34 2017
@@ -36,5 +36,5 @@
 depend fmri=system/header type=require
 depend fmri=system/management/snmp/net-snmp type=require
 depend fmri=text/gnu-gettext type=require
-depend fmri=library/python-2/python-extra-26 type=require
+depend fmri=library/python-2/python-extra-27 type=require
 depend fmri=pkg://omnios/runtime/python-27 type=require
--- old/build/jeos/omnios-userland.p5m	Mon Jan  9 12:11:34 2017
+++ new/build/jeos/omnios-userland.p5m	Mon Jan  9 12:11:34 2017
@@ -60,29 +60,17 @@
 depend fmri=library/nspr/header-nspr@4.12,5.11-@PVER@ type=incorporate
 depend fmri=library/pcre@8.39,5.11-@PVER@ type=incorporate
 depend fmri=library/perl-5/xml-parser@2.44,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/cherrypy-26@3.2.2,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/cherrypy-27@3.2.2,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/lxml-26@3.6,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/lxml-27@3.6,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/m2crypto-26@0.24,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/m2crypto-27@0.24,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/mako-26@1.0,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/mako-27@1.0,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/numpy-26@1.11,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/numpy-27@1.11,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/ply-26@3.9,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/ply-27@3.9,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/pybonjour-26@1.1.1,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/pybonjour-27@1.1.1,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/pycurl-26@7.43,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/pycurl-27@7.43,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/pyopenssl-26@0.11,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/pyopenssl-27@0.11,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/pyrex-26@0.9.9,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/pyrex-27@0.9.9,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/setuptools-26@0.6.11,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/setuptools-27@0.6.11,5.11-@PVER@ type=incorporate
-depend fmri=library/python-2/simplejson-26@3.8,5.11-@PVER@ type=incorporate
 depend fmri=library/python-2/simplejson-27@3.8,5.11-@PVER@ type=incorporate
 depend fmri=library/readline@7.0,5.11-@PVER@ type=incorporate
 depend fmri=library/security/openssl@1.0.2,5.11-@PVER@ type=incorporate
@@ -102,7 +90,6 @@
 depend fmri=runtime/perl@5.16.1,5.11-@PVER@ type=incorporate
 depend fmri=runtime/perl-64@5.16.1,5.11-@PVER@ type=incorporate
 depend fmri=runtime/perl/manual@5.16.1,5.11-@PVER@ type=incorporate
-depend fmri=runtime/python-26@2.6.8,5.11-@PVER@ type=incorporate
 depend fmri=security/sudo@1.8,5.11-@PVER@ type=incorporate
 depend fmri=service/network/ntp@4.2.8,5.11-@PVER@ type=incorporate
 depend fmri=shell/bash@4.4,5.11-@PVER@ type=incorporate
--- old/build/libxml2/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/libxml2/build.sh	Mon Jan  9 12:11:34 2017
@@ -35,12 +35,14 @@
 
 DEPENDS_IPS="compress/xz system/library/gcc-5-runtime library/zlib"
 BUILD_DEPENDS_IPS="$DEPENDS_IPS developer/sunstudio12.1"
+# Keep python tied to the version we're supporting, to aid future changes.
+CONFIGURE_OPTS="--with-python=/usr/bin/python2.7"
 
 fix_python_install() {
-    logcmd mkdir -p $DESTDIR/usr/lib/python2.6/vendor-packages
-    logcmd mv $DESTDIR/usr/lib/python2.6/site-packages/* $DESTDIR/usr/lib/python2.6/vendor-packages/ || logerr "failed relocating python install"
-    logcmd rm -f $DESTDIR/usr/lib/python2.6/vendor-packages/64/drv_libxml2.py
-    logcmd rm -rf $DESTDIR/usr/lib/python2.6/site-packages || logerr "failed removing bad python install"
+    logcmd mkdir -p $DESTDIR/usr/lib/python2.7/vendor-packages
+    logcmd mv $DESTDIR/usr/lib/python2.7/site-packages/* $DESTDIR/usr/lib/python2.7/vendor-packages/ || logerr "failed relocating python install"
+    logcmd rm -f $DESTDIR/usr/lib/python2.7/vendor-packages/64/drv_libxml2.py
+    logcmd rm -rf $DESTDIR/usr/lib/python2.7/site-packages || logerr "failed removing bad python install"
     logcmd rm -rf $DESTDIR/usr/include/amd64 || logerr "failed removing bad includes install"
 }
 
@@ -71,7 +73,7 @@
         logerr "libtool libxml2mod.la patch failed"
 
     logcmd $MAKE DESTDIR=${DESTDIR} \
-        PYTHON_SITE_PACKAGES=/usr/lib/python2.6/site-packages/64 \
+        PYTHON_SITE_PACKAGES=/usr/lib/python2.7/site-packages/64 \
         install || \
         logerr "--- Make install failed"
 }
--- old/build/libxslt/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/libxslt/build.sh	Mon Jan  9 12:11:34 2017
@@ -40,8 +40,8 @@
 LDFLAGS="-lpthread"
 
 CONFIGURE_OPTS="--disable-static --with-pic --with-threads --without-crypto"
-CONFIGURE_OPTS_32="$CONFIGURE_OPTS_32 --with-python=/usr/bin/$ISAPART/python2.6"
-CONFIGURE_OPTS_64="$CONFIGURE_OPTS_64 --with-python=/usr/bin/$ISAPART64/python2.6"
+CONFIGURE_OPTS_32="$CONFIGURE_OPTS_32 --with-python=/usr/bin/$ISAPART/python2.7"
+CONFIGURE_OPTS_64="$CONFIGURE_OPTS_64 --with-python=/usr/bin/$ISAPART64/python2.7"
 
 NO_PARALLEL_MAKE="true"
 
--- old/build/mercurial/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/mercurial/build.sh	Mon Jan  9 12:11:34 2017
@@ -33,7 +33,7 @@
 SUMMARY="$PROG - a free and open source, distributed version control system"
 DESC="$SUMMARY"
 
-DEPENDS_IPS="runtime/python-26 \
+DEPENDS_IPS="runtime/python-27 \
              web/curl \
              library/security/openssl@1.0.2
              library/zlib"
@@ -42,7 +42,7 @@
 CONFIGURE_OPTS=""
 
 PYTHONPATH=/usr
-PYTHON=$PYTHONPATH/bin/python2.6
+PYTHON=$PYTHONPATH/bin/python2.7
 PYTHONLIB=$PYTHONPATH/lib
 
 python_build() {
@@ -69,7 +69,7 @@
         logerr "--- install failed"
     popd > /dev/null
 
-    mv $DESTDIR/usr/lib/python2.6/site-packages $DESTDIR/usr/lib/python2.6/vendor-packages ||
+    mv $DESTDIR/usr/lib/python2.7/site-packages $DESTDIR/usr/lib/python2.7/vendor-packages ||
         logerr "Cannot move from site-packages to vendor-packages"
 }
 
--- old/build/pkg/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/pkg/build.sh	Mon Jan  9 12:11:34 2017
@@ -21,7 +21,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2011-2012 OmniTI Computer Consulting, Inc.  All rights reserved.
+# Copyright 2017 OmniTI Computer Consulting, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # Load support functions
@@ -48,7 +48,7 @@
 BRAND_CFLAGS="-I./gate-include"
 
 BUILD_DEPENDS_IPS="developer/versioning/git developer/versioning/mercurial system/zones/internal"
-DEPENDS_IPS="runtime/python-26@2.6.7"
+DEPENDS_IPS="runtime/python-27"
 
 crib_headers(){
     # Use PREBUILT_ILLUMOS if available, otherwise, just pull off the
--- /dev/null	Mon Jan  9 12:11:34 2017
+++ new/build/python-cherrypy/26-obsolete.p5m	Mon Jan  9 12:11:34 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/cherrypy-26@3.2.2-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-cherrypy/build.sh	Mon Jan  9 12:11:34 2017
+++ new/build/python-cherrypy/build.sh	Mon Jan  9 12:11:34 2017
@@ -32,25 +32,10 @@
 SUMMARY="cherrypy - A Minimalist Python Web Framework"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/cherrypy-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/cherrypy-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -60,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-cherrypy/rename.p5m	Mon Jan  9 12:11:34 2017
+++ new/build/python-cherrypy/rename.p5m	Mon Jan  9 12:11:34 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="cherrypy - A Minimalist Python Web Framework"
 set name=pkg.summary value="cherrypy - A Minimalist Python Web Framework"
-depend fmri=library/python-2/cherrypy-26 type=require
+depend fmri=library/python-2/cherrypy-27 type=require
--- /dev/null	Mon Jan  9 12:11:34 2017
+++ new/build/python-coverage/26-obsolete.p5m	Mon Jan  9 12:11:34 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/coverage-26@4.2-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-coverage/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-coverage/build.sh	Mon Jan  9 12:11:35 2017
@@ -32,25 +32,10 @@
 SUMMARY="Code coverage measurement for Python"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-RUN_DEPENDS_IPS="runtime/python-26"
-PKG=library/python-2/coverage-26
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 RUN_DEPENDS_IPS="runtime/python-27"
 PKG=library/python-2/coverage-27
 init
@@ -60,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-extra-26/python-extra-26.p5m	Mon Jan  9 12:11:35 2017
+++ /dev/null	Mon Jan  9 12:11:34 2017
@@ -1,9 +0,0 @@
-set name=pkg.fmri value=library/python-2/python-extra-26@0.5.11,5.11-0.@RELVER@
-set name=variant.arch value=i386
-set name=pkg.description value="Supplemental Python libraries and utilities"
-set name=variant.opensolaris.zone value=global value=nonglobal
-set name=description value="Supplemental Python libraries and utilities"
-set name=info.classification value=org.opensolaris.category.2008:Development/Python
-set name=pkg.summary value="Supplemental Python libraries and utilities"
-depend fmri=library/python-2/pyrex-26 type=require
-depend fmri=library/python-2/numpy-26 type=require
--- /dev/null	Mon Jan  9 12:11:35 2017
+++ new/build/python-extra-27/26-obsolete.p5m	Mon Jan  9 12:11:35 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/python-extra-26@0.5.11,5.11-0.@RELVER@
+set name=pkg.obsolete value=true
--- old/build/python-functools32/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-functools32/build.sh	Mon Jan  9 12:11:35 2017
@@ -33,12 +33,9 @@
 SUMMARY="Backport of the functools module from Python 3.2.3 for use on 2.7"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this for 2.7 for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.7
+# In the future when we upgrade python again, be sure to wrap the following     
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.          
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/functools32-27
 RUN_DEPENDS_IPS="runtime/python-27"
@@ -51,5 +48,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:35 2017
+++ new/build/python-jsonrpclib/26-obsolete.p5m	Mon Jan  9 12:11:35 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/jsonrpclib-26@0.1.7-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-jsonrpclib/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-jsonrpclib/build.sh	Mon Jan  9 12:11:35 2017
@@ -32,25 +32,10 @@
 SUMMARY="A Python JSON-RPC over HTTP that mirrors xmlrpclib syntax"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/jsonrpclib-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/jsonrpclib-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -60,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-jsonschema/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-jsonschema/build.sh	Mon Jan  9 12:11:35 2017
@@ -32,12 +32,9 @@
 SUMMARY="An implementation of JSON Schema validation for Python"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this for 2.7 for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.7
+# In the future when we upgrade python again, be sure to wrap the following     
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.          
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/jsonschema-27
 RUN_DEPENDS_IPS="runtime/python-27"
@@ -48,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:35 2017
+++ new/build/python-lxml/26-obsolete.p5m	Mon Jan  9 12:11:35 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/lxml-26@3.6.4-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-lxml/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-lxml/build.sh	Mon Jan  9 12:11:35 2017
@@ -32,26 +32,10 @@
 SUMMARY="lxml - Powerful and Pythonic XML processing library"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/lxml-26
-RUN_DEPENDS_IPS="runtime/python-26 library/libxml2 library/libxslt"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-strip_install -x
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/lxml-27
 RUN_DEPENDS_IPS="runtime/python-27 library/libxml2 library/libxslt"
 init
@@ -62,5 +46,3 @@
 strip_install -x
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:35 2017
+++ new/build/python-m2crypto/26-obsolete.p5m	Mon Jan  9 12:11:35 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/m2crypto-26@0.24.0-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-m2crypto/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-m2crypto/build.sh	Mon Jan  9 12:11:35 2017
@@ -34,25 +34,10 @@
 
 BUILD_DEPENDS_IPS="swig"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/m2crypto-26
-RUN_DEPENDS_IPS="runtime/python-26 library/security/openssl@1.0.2"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/m2crypto-27
 RUN_DEPENDS_IPS="runtime/python-27 library/security/openssl@1.0.2"
 init
@@ -62,5 +47,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-m2crypto/rename.p5m	Mon Jan  9 12:11:35 2017
+++ new/build/python-m2crypto/rename.p5m	Mon Jan  9 12:11:35 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="Python interface for openssl"
 set name=pkg.summary value="Python interface for openssl"
-depend fmri=library/python-2/m2crypto-26 type=require
+depend fmri=library/python-2/m2crypto-27 type=require
--- /dev/null	Mon Jan  9 12:11:35 2017
+++ new/build/python-mako/26-obsolete.p5m	Mon Jan  9 12:11:35 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/mako-26@1.0.4-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-mako/build.sh	Mon Jan  9 12:11:35 2017
+++ new/build/python-mako/build.sh	Mon Jan  9 12:11:35 2017
@@ -21,7 +21,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2011-2012 OmniTI Computer Consulting, Inc.  All rights reserved.
+# Copyright 2017 OmniTI Computer Consulting, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # Load support functions
@@ -32,23 +32,9 @@
 SUMMARY="Mako - a python templating language"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/mako-26
-RUN_DEPENDS_IPS="runtime/python-26 library/python-2/setuptools-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 set_python_version 2.7
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/mako-27
@@ -60,5 +46,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-mako/rename.p5m	Mon Jan  9 12:11:36 2017
+++ new/build/python-mako/rename.p5m	Mon Jan  9 12:11:36 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="Mako - a python templating language"
 set name=pkg.summary value="Mako - a python templating language"
-depend fmri=library/python-2/mako-26 type=require
+depend fmri=library/python-2/mako-27 type=require
--- /dev/null	Mon Jan  9 12:11:36 2017
+++ new/build/python-numpy/26-obsolete.p5m	Mon Jan  9 12:11:36 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/numpy-26@1.11.2-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-numpy/build.sh	Mon Jan  9 12:11:36 2017
+++ new/build/python-numpy/build.sh	Mon Jan  9 12:11:36 2017
@@ -46,26 +46,10 @@
 
 save_function clean_up clean_up_orig
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/numpy-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-strip_install -x
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/numpy-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -76,5 +60,3 @@
 strip_install -x
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:36 2017
+++ new/build/python-ply/26-obsolete.p5m	Mon Jan  9 12:11:36 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/ply-26@3.9-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-ply/build.sh	Mon Jan  9 12:11:36 2017
+++ new/build/python-ply/build.sh	Mon Jan  9 12:11:36 2017
@@ -38,26 +38,10 @@
         $TMPDIR/$BUILDDIR/LICENSE
 }
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/ply-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_license
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/ply-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -68,5 +52,3 @@
 make_license
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-ply/rename.p5m	Mon Jan  9 12:11:36 2017
+++ new/build/python-ply/rename.p5m	Mon Jan  9 12:11:36 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="ply - Python lex and yacc"
 set name=pkg.summary value="ply - Python lex and yacc"
-depend fmri=library/python-2/ply-26 type=require
+depend fmri=library/python-2/ply-27 type=require
--- /dev/null	Mon Jan  9 12:11:36 2017
+++ new/build/python-pybonjour/26-obsolete.p5m	Mon Jan  9 12:11:36 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/pybonjour-26@1.1.1-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-pybonjour/build.sh	Mon Jan  9 12:11:36 2017
+++ new/build/python-pybonjour/build.sh	Mon Jan  9 12:11:36 2017
@@ -37,26 +37,10 @@
         $TMPDIR/$BUILDDIR/LICENSE
 }
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-PKG=library/python-2/pybonjour-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_license
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 PKG=library/python-2/pybonjour-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -67,5 +51,3 @@
 make_license
 make_package
 clean_up
-
-set_python_version $OLDPY
--- old/build/python-pybonjour/rename.p5m	Mon Jan  9 12:11:36 2017
+++ new/build/python-pybonjour/rename.p5m	Mon Jan  9 12:11:36 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="pure-Python interface bonjour/DNS-SD implementation"
 set name=pkg.summary value="pure-Python interface bonjour/DNS-SD implementation"
-depend fmri=library/python-2/pybonjour-26 type=require
+depend fmri=library/python-2/pybonjour-27 type=require
--- /dev/null	Mon Jan  9 12:11:36 2017
+++ new/build/python-pycurl/26-obsolete.p5m	Mon Jan  9 12:11:36 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/pycurl-26@7.43.0-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-pycurl/build.sh	Mon Jan  9 12:11:36 2017
+++ new/build/python-pycurl/build.sh	Mon Jan  9 12:11:36 2017
@@ -32,23 +32,9 @@
 SUMMARY="Python bindings for libcurl"
 DESC="PycURL provides a thin layer of Python bindings on top of libcurl."
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
-XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
-PKG=library/python-2/pycurl-26
-RUN_DEPENDS_IPS="runtime/python-26 library/security/openssl@1.0.2 web/curl"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 set_python_version 2.7
 XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
 PKG=library/python-2/pycurl-27
@@ -60,5 +46,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python-pycurl/rename.p5m	Mon Jan  9 12:11:36 2017
+++ new/build/python-pycurl/rename.p5m	Mon Jan  9 12:11:36 2017
@@ -2,4 +2,4 @@
 set name=pkg.renamed value=true
 set name=pkg.description value="Python bindings for libcurl"
 set name=pkg.summary value="Python bindings for libcurl"
-depend fmri=library/python-2/pycurl-26 type=require
+depend fmri=library/python-2/pycurl-27 type=require
--- /dev/null	Mon Jan  9 12:11:36 2017
+++ new/build/python-pylint/26-obsolete.p5m	Mon Jan  9 12:11:36 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/pylint-26@1.6.4-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-pylint/build.sh	Mon Jan  9 12:11:37 2017
+++ new/build/python-pylint/build.sh	Mon Jan  9 12:11:37 2017
@@ -32,25 +32,10 @@
 SUMMARY="python code static checker"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
-PKG=library/python-2/pylint-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
 PKG=library/python-2/pylint-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -60,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:37 2017
+++ new/build/python-pyopenssl/26-obsolete.p5m	Mon Jan  9 12:11:37 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/pyopenssl-26@0.11-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-pyopenssl/build.sh	Mon Jan  9 12:11:37 2017
+++ new/build/python-pyopenssl/build.sh	Mon Jan  9 12:11:37 2017
@@ -21,7 +21,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2011-2012 OmniTI Computer Consulting, Inc.  All rights reserved.
+# Copyright 2017 OmniTI Computer Consulting, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # Load support functions
@@ -32,25 +32,10 @@
 SUMMARY="pyOpenSSL - Python interface to the OpenSSL library for Python 2.6"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
-PKG=library/python-2/pyopenssl-26
-RUN_DEPENDS_IPS="runtime/python-26 library/security/openssl@1.0.2"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONPKGVER=$PYTHONPKGVER"
 PKG=library/python-2/pyopenssl-27
 RUN_DEPENDS_IPS="runtime/python-27 library/security/openssl@1.0.2"
 init
@@ -60,5 +45,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:37 2017
+++ new/build/python-pyrex/26-obsolete.p5m	Mon Jan  9 12:11:37 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/pyrex-26@0.9.9-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-pyrex/build.sh	Mon Jan  9 12:11:37 2017
+++ new/build/python-pyrex/build.sh	Mon Jan  9 12:11:37 2017
@@ -32,27 +32,9 @@
 SUMMARY="Pyrex - a Language for Writing Python Extension Modules"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
-PKG=library/python-2/pyrex-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-# XXX KEBE SAYS FIX ME...
-mv $DESTDIR/usr/bin/pyrexc $DESTDIR/usr/bin/pyrexc2.6
-ln -s ./pyrexc2.6 $DESTDIR/usr/bin/pyrexc
-strip_install -x
-make_package
-clean_up
-
-set_python_version 2.7
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 PKG=library/python-2/pyrex-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -60,11 +42,8 @@
 patch_source
 prep_build
 python_build
-# XXX KEBE SAYS FIX ME...
 mv $DESTDIR/usr/bin/pyrexc $DESTDIR/usr/bin/pyrexc2.7
 ln -s ./pyrexc2.7 $DESTDIR/usr/bin/pyrexc
 strip_install -x
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:37 2017
+++ new/build/python-setuptools/26-obsolete.p5m	Mon Jan  9 12:11:37 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/setuptools-26@0.6.11-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-setuptools/build.sh	Mon Jan  9 12:11:37 2017
+++ new/build/python-setuptools/build.sh	Mon Jan  9 12:11:37 2017
@@ -32,27 +32,10 @@
 SUMMARY="setuptools - yet another python packaging requirement"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
-RUN_DEPENDS_IPS="runtime/python-26"
-PKG=library/python-2/setuptools-26
-init
-prep_build
-mkdir -p $DESTDIR/usr/lib/python2.6/vendor-packages
-PYTHONPATH=$DESTDIR/usr/lib/python2.6/vendor-packages \
-    python2.6 ez_setup.py --always-copy \
-        --install-dir $DESTDIR/usr/lib/python2.6/vendor-packages/ \
-        setuptools
-make_package
-clean_up
-
-set_python_version 2.7
-XFORM_ARGS="-D PYTHONVER=$PYTHONVER"
 RUN_DEPENDS_IPS="runtime/python-27"
 PKG=library/python-2/setuptools-27
 init
@@ -64,5 +47,3 @@
         setuptools
 make_package
 clean_up
-
-set_python_version $OLDPV
--- /dev/null	Mon Jan  9 12:11:37 2017
+++ new/build/python-simplejson/26-obsolete.p5m	Mon Jan  9 12:11:37 2017
@@ -0,0 +1,2 @@
+set name=pkg.fmri value=library/python-2/simplejson-26@3.8.2-@PVER@
+set name=pkg.obsolete value=true
--- old/build/python-simplejson/build.sh	Mon Jan  9 12:11:37 2017
+++ new/build/python-simplejson/build.sh	Mon Jan  9 12:11:37 2017
@@ -29,26 +29,12 @@
 
 PROG=simplejson
 VER=3.8.2
-SUMMARY="simplejson - Python interface to JSON for Python 2.6"
+SUMMARY="simplejson - Python interface to JSON for Python 2.7"
 DESC="$SUMMARY"
 
-# Pardon the copy/paste, but we have to do this twice (2.6 & 2.7) for now.
-# And the only way buildctl detects packages is by grepping for PKG assignment.
-
-OLDPV=$PYTHONVER
-
-set_python_version 2.6
-PKG=library/python-2/simplejson-26
-RUN_DEPENDS_IPS="runtime/python-26"
-init
-download_source $PROG $PROG $VER
-patch_source
-prep_build
-python_build
-make_package
-clean_up
-
-set_python_version 2.7
+# In the future when we upgrade python again, be sure to wrap the following
+# around with set_python_version and reassign PKG and RUN_DEPENDS_IPS.
+# The only way buildctl detects packages is by grepping for PKG assignment.
 PKG=library/python-2/simplejson-27
 RUN_DEPENDS_IPS="runtime/python-27"
 init
@@ -58,5 +44,3 @@
 python_build
 make_package
 clean_up
-
-set_python_version $OLDPV
--- old/build/python26/build.sh	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,130 +0,0 @@
-#!/usr/bin/bash
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2011-2012 OmniTI Computer Consulting, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# Load support functions
-. ../../lib/functions.sh
-
-CC=gcc
-CXX=g++
-
-PROG=Python
-VER=2.6.8
-PKG=runtime/python-26
-SUMMARY="$PROG"
-DESC="$SUMMARY"
-
-BUILD_DEPENDS_IPS="developer/build/autoconf"
-DEPENDS_IPS="system/library/gcc-5-runtime library/zlib library/libffi@$FFIVERS
-	library/readline database/sqlite-3 compress/bzip2 library/libxml2
-	library/ncurses library/security/openssl"
-
-export CCSHARED="-fPIC"
-CFLAGS="$CFLAGS -std=c99"
-LDFLAGS32="-L/usr/gnu/lib -R/usr/gnu/lib"
-LDFLAGS64="-L/usr/gnu/lib/amd64 -R/usr/gnu/lib/amd64"
-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses -D_LARGEFILE64_SOURCE"
-CPPFLAGS32="-I/usr/lib/libffi-$FFIVERS/include"
-CPPFLAGS64="-I/usr/lib/amd64/libffi-$FFIVERS/include"
-CONFIGURE_OPTS="--enable-shared
-	--with-system-ffi
-	ac_cv_opt_olimit_ok=no
-	ac_cv_olimit_ok=no"
-
-preprep_build() {
-    pushd $TMPDIR/$BUILDDIR > /dev/null || logerr "Cannot change to build directory"
-    /usr/bin/autoheader || logerr "autoheaer failed"
-    /usr/bin/autoconf || logerr "autoreconf failed"
-    popd > /dev/null
-}
-
-post_config() {
-    pushd $TMPDIR/$BUILDDIR > /dev/null || logerr "Cannot change to build directory"
-    perl -pi -e 's/(^\#define _POSIX_C_SOURCE.*)/\/* $$1 *\//' pyconfig.h
-    perl -pi -e 's/^(\#define _XOPEN_SOURCE.*)/\/* $$1 *\//' pyconfig.h
-    perl -pi -e 's/^(\#define _XOPEN_SOURCE_EXTENDED.*)/\/* $$1 *\//' pyconfig.h
-    popd > /dev/null
-}
-
-configure64() {
-    logmsg "--- configure (64-bit)"
-    CFLAGS="$CFLAGS $CFLAGS64" \
-    CXXFLAGS="$CXXFLAGS $CXXFLAGS64" \
-    CPPFLAGS="$CPPFLAGS $CPPFLAGS64" \
-    LDFLAGS="$LDFLAGS $LDFLAGS64" \
-    CC="$CC -m64" CXX=$CXX \
-    logcmd $CONFIGURE_CMD $CONFIGURE_OPTS_64 \
-    $CONFIGURE_OPTS || \
-        logerr "--- Configure failed"
-}
-
-make_prog32() {
-    post_config
-    [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
-    logmsg "--- make"
-    logcmd $MAKE $MAKE_JOBS DFLAGS=-32 || \
-        logerr "--- Make failed"
-}
-
-make_prog64() {
-    post_config
-    [[ -n $NO_PARALLEL_MAKE ]] && MAKE_JOBS=""
-    logmsg "--- make"
-    logcmd $MAKE $MAKE_JOBS DFLAGS=-64 DESTSHARED=/usr/lib/python2.6/lib-dynload || \
-        logerr "--- Make failed"
-}
-
-make_install32() {
-    make_install
-    rm $DESTDIR/usr/bin/i386/python || logerr "--- cannot remove arch hardlink"
-    mv $DESTDIR/usr/lib/python2.6/config/Makefile $DESTDIR/usr/lib/python2.6/config/Makefile.32 || logerr "--- Makefile backup (32)"
-}
-make_install64() {
-    logmsg "--- make install"
-    logcmd $MAKE DESTDIR=${DESTDIR} install DESTSHARED=/usr/lib/python2.6/lib-dynload || \
-        logerr "--- Make install failed"
-    rm $DESTDIR/usr/bin/amd64/python || logerr "--- cannot remove arch hardlink"
-    rm $DESTDIR/usr/lib/python2.6/config/libpython2.6.a || logerr "--- cannot remove static lib"
-    # XXX KEBE SAYS Remove this line once 2.7 is the default!
-    (cd $DESTDIR/usr/bin && ln -s python2.6 python) ||  logerr "--- could not setup python softlink"
-    mv $DESTDIR/usr/lib/python2.6/config/Makefile $DESTDIR/usr/lib/python2.6/config/Makefile.64 || logerr "--- Makefile backup (64)"
-    mv $DESTDIR/usr/lib/python2.6/config/Makefile.32 $DESTDIR/usr/lib/python2.6/config/Makefile || logerr "--- Makefile restore (32)"
-}
-
-install_license(){
-    logcmd cp $TMPDIR/$BUILDDIR/LICENSE $DESTDIR/license
-}
-
-init
-download_source $PROG $PROG $VER
-patch_source
-preprep_build
-prep_build
-build
-make_isa_stub
-strip_install -x
-install_license
-make_package
-clean_up
--- old/build/python26/local.mog	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,20 +0,0 @@
-<transform file path=license$ -> drop>
-license license license=PSF
-
-# Prevents pkgdepend from freaking out.
-
-<transform file path=usr/bin/amd64/smtpd.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/bin/i386/smtpd.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/cProfile.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/pdb.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/platform.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/profile.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/pydoc.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/smtpd.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/test/test_cd.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/test/test_cl.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/test/test_gl.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/test/test_imageop.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/test/test_tcl.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/trace.py -> set pkg.depend.bypass-generate .*>
-<transform file path=usr/lib/python2.6/webbrowser.py -> set pkg.depend.bypass-generate .*>
--- old/build/python26/patches/Python26-00-filemagic.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,2160 +0,0 @@
-diff -u Python-2.6.4/Lib/platform.py.orig Python-2.6.4/Lib/platform.py
---- Python-2.6.4/Lib/platform.py.orig	Mon Feb 21 10:46:30 2011
-+++ Python-2.6.4/Lib/platform.py	Mon Feb 21 10:46:30 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """ This module tries to retrieve as much platform-identifying data as
-     possible. It makes this information available via function APIs.
-diff -u Python-2.6.4/Lib/profile.py.orig Python-2.6.4/Lib/profile.py
---- Python-2.6.4/Lib/profile.py.orig	Mon Feb 21 10:46:25 2011
-+++ Python-2.6.4/Lib/profile.py	Mon Feb 21 10:46:25 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # Class for profiling python code. rev 1.0  6/2/94
- #
-diff -u Python-2.6.4/Lib/trace.py.orig Python-2.6.4/Lib/trace.py
---- Python-2.6.4/Lib/trace.py.orig	Mon Feb 21 10:46:29 2011
-+++ Python-2.6.4/Lib/trace.py	Mon Feb 21 10:46:29 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # portions copyright 2001, Autonomous Zones Industries, Inc., all rights...
- # err...  reserved and offered to the public under the terms of the
-diff -u Python-2.6.4/Lib/cProfile.py.orig Python-2.6.4/Lib/cProfile.py
---- Python-2.6.4/Lib/cProfile.py.orig	Mon Feb 21 10:46:29 2011
-+++ Python-2.6.4/Lib/cProfile.py	Mon Feb 21 10:46:29 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Python interface for the 'lsprof' profiler.
-    Compatible with the 'profile' module.
-diff -u Python-2.6.4/Lib/idlelib/PyShell.py.orig Python-2.6.4/Lib/idlelib/PyShell.py
---- Python-2.6.4/Lib/idlelib/PyShell.py.orig	Mon Feb 21 10:46:23 2011
-+++ Python-2.6.4/Lib/idlelib/PyShell.py	Mon Feb 21 10:46:23 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import os
- import os.path
-diff -u Python-2.6.4/Lib/UserString.py.orig Python-2.6.4/Lib/UserString.py
---- Python-2.6.4/Lib/UserString.py.orig	Mon Feb 21 10:46:27 2011
-+++ Python-2.6.4/Lib/UserString.py	Mon Feb 21 10:46:27 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- ## vim:ts=4:et:nowrap
- """A user-defined wrapper around string objects
- 
-diff -u Python-2.6.4/Lib/lib2to3/pgen2/token.py.orig Python-2.6.4/Lib/lib2to3/pgen2/token.py
---- Python-2.6.4/Lib/lib2to3/pgen2/token.py.orig	Mon Feb 21 10:46:25 2011
-+++ Python-2.6.4/Lib/lib2to3/pgen2/token.py	Mon Feb 21 10:46:25 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Token constants (from "token.h")."""
- 
-diff -u Python-2.6.4/Lib/cgi.py.orig Python-2.6.4/Lib/cgi.py
---- Python-2.6.4/Lib/cgi.py.orig	Mon Feb 21 10:46:24 2011
-+++ Python-2.6.4/Lib/cgi.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#! /usr/local/bin/python
-+#!/usr/bin/python2.6
- 
- # NOTE: the above "/usr/local/bin/python" is NOT a mistake.  It is
- # intentionally NOT "/usr/bin/env python".  On many systems
-diff -u Python-2.6.4/Lib/base64.py.orig Python-2.6.4/Lib/base64.py
---- Python-2.6.4/Lib/base64.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/base64.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """RFC 3548: Base16, Base32, Base64 Data Encodings"""
- 
-diff -u Python-2.6.4/Lib/encodings/rot_13.py.orig Python-2.6.4/Lib/encodings/rot_13.py
---- Python-2.6.4/Lib/encodings/rot_13.py.orig	Mon Feb 21 10:46:26 2011
-+++ Python-2.6.4/Lib/encodings/rot_13.py	Mon Feb 21 10:46:26 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- """ Python Character Mapping Codec for ROT13.
- 
-     See http://ucsub.colorado.edu/~kominek/rot13/ for details.
-diff -u Python-2.6.4/Lib/tabnanny.py.orig Python-2.6.4/Lib/tabnanny.py
---- Python-2.6.4/Lib/tabnanny.py.orig	Mon Feb 21 10:46:27 2011
-+++ Python-2.6.4/Lib/tabnanny.py	Mon Feb 21 10:46:27 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """The Tab Nanny despises ambiguous indentation.  She knows no mercy.
- 
-diff -u Python-2.6.4/Lib/timeit.py.orig Python-2.6.4/Lib/timeit.py
---- Python-2.6.4/Lib/timeit.py.orig	Mon Feb 21 10:46:23 2011
-+++ Python-2.6.4/Lib/timeit.py	Mon Feb 21 10:46:23 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Tool for measuring execution time of small code snippets.
- 
-diff -u Python-2.6.4/Lib/pydoc.py.orig Python-2.6.4/Lib/pydoc.py
---- Python-2.6.4/Lib/pydoc.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/pydoc.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: latin-1 -*-
- """Generate Python documentation in HTML or text for interactive use.
- 
-diff -u Python-2.6.4/Lib/quopri.py.orig Python-2.6.4/Lib/quopri.py
---- Python-2.6.4/Lib/quopri.py.orig	Mon Feb 21 10:46:29 2011
-+++ Python-2.6.4/Lib/quopri.py	Mon Feb 21 10:46:29 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Conversions to/from quoted-printable transport encoding as per RFC 1521."""
- 
-diff -u Python-2.6.4/Lib/keyword.py.orig Python-2.6.4/Lib/keyword.py
---- Python-2.6.4/Lib/keyword.py.orig	Mon Feb 21 10:46:24 2011
-+++ Python-2.6.4/Lib/keyword.py	Mon Feb 21 10:46:24 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Keywords (from "graminit.c")
- 
-diff -u Python-2.6.4/Lib/mailbox.py.orig Python-2.6.4/Lib/mailbox.py
---- Python-2.6.4/Lib/mailbox.py.orig	Mon Feb 21 10:46:27 2011
-+++ Python-2.6.4/Lib/mailbox.py	Mon Feb 21 10:46:27 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
- 
-diff -u Python-2.6.4/Lib/difflib.py.orig Python-2.6.4/Lib/difflib.py
---- Python-2.6.4/Lib/difflib.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/difflib.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- Module difflib -- helpers for computing deltas between objects.
-diff -u Python-2.6.4/Lib/webbrowser.py.orig Python-2.6.4/Lib/webbrowser.py
---- Python-2.6.4/Lib/webbrowser.py.orig	Mon Feb 21 10:46:26 2011
-+++ Python-2.6.4/Lib/webbrowser.py	Mon Feb 21 10:46:26 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Interfaces for launching and remotely controlling Web browsers."""
- # Maintained by Georg Brandl.
- 
-diff -u Python-2.6.4/Lib/unittest.py.orig Python-2.6.4/Lib/unittest.py
---- Python-2.6.4/Lib/unittest.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/unittest.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- '''
- Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
- Smalltalk testing framework.
-diff -u Python-2.6.4/Lib/bsddb/test/test_dbtables.py.orig Python-2.6.4/Lib/bsddb/test/test_dbtables.py
---- Python-2.6.4/Lib/bsddb/test/test_dbtables.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/bsddb/test/test_dbtables.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- #-----------------------------------------------------------------------
- # A test suite for the table interface built on bsddb.db
-diff -u Python-2.6.4/Lib/bsddb/dbshelve.py.orig Python-2.6.4/Lib/bsddb/dbshelve.py
---- Python-2.6.4/Lib/bsddb/dbshelve.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/bsddb/dbshelve.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#!/bin/env python
-+#!/usr/bin/python2.6
- #------------------------------------------------------------------------
- #           Copyright (c) 1997-2001 by Total Control Software
- #                         All Rights Reserved
-diff -u Python-2.6.4/Lib/token.py.orig Python-2.6.4/Lib/token.py
---- Python-2.6.4/Lib/token.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/token.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Token constants (from "token.h")."""
- 
-diff -u Python-2.6.4/Lib/Cookie.py.orig Python-2.6.4/Lib/Cookie.py
---- Python-2.6.4/Lib/Cookie.py.orig	Mon Feb 21 10:46:25 2011
-+++ Python-2.6.4/Lib/Cookie.py	Mon Feb 21 10:46:25 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- 
- ####
-diff -u Python-2.6.4/Lib/smtplib.py.orig Python-2.6.4/Lib/smtplib.py
---- Python-2.6.4/Lib/smtplib.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/smtplib.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- '''SMTP/ESMTP client class.
- 
-diff -u Python-2.6.4/Lib/smtpd.py.orig Python-2.6.4/Lib/smtpd.py
---- Python-2.6.4/Lib/smtpd.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/smtpd.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """An RFC 2821 smtp proxy.
- 
- Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
-diff -u Python-2.6.4/Lib/test/regrtest.py.orig Python-2.6.4/Lib/test/regrtest.py
---- Python-2.6.4/Lib/test/regrtest.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/regrtest.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Regression test.
- 
-diff -u Python-2.6.4/Lib/test/test_sets.py.orig Python-2.6.4/Lib/test/test_sets.py
---- Python-2.6.4/Lib/test/test_sets.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_sets.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import warnings
- warnings.filterwarnings("ignore", "the sets module is deprecated",
-diff -u Python-2.6.4/Lib/test/test_dl.py.orig Python-2.6.4/Lib/test/test_dl.py
---- Python-2.6.4/Lib/test/test_dl.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_dl.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test dlmodule.c
-    Roger E. Masse  revised strategy by Barry Warsaw
- """
-diff -u Python-2.6.4/Lib/test/test_multiprocessing.py.orig Python-2.6.4/Lib/test/test_multiprocessing.py
---- Python-2.6.4/Lib/test/test_multiprocessing.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_multiprocessing.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- #
- # Unit tests for the multiprocessing package
-diff -u Python-2.6.4/Lib/test/test_cmd.py.orig Python-2.6.4/Lib/test/test_cmd.py
---- Python-2.6.4/Lib/test/test_cmd.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/test/test_cmd.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- """
- Test script for the 'cmd' module
- Original by Michael Schneider
-diff -u Python-2.6.4/Lib/test/test_userstring.py.orig Python-2.6.4/Lib/test/test_userstring.py
---- Python-2.6.4/Lib/test/test_userstring.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_userstring.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # UserString is a wrapper around the native builtin string type.
- # UserString instances should behave similar to builtin string objects.
- 
-diff -u Python-2.6.4/Lib/test/test_popen.py.orig Python-2.6.4/Lib/test/test_popen.py
---- Python-2.6.4/Lib/test/test_popen.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_popen.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Basic tests for os.popen()
- 
-   Particularly useful for platforms that fake popen.
-diff -u Python-2.6.4/Lib/test/test_cd.py.orig Python-2.6.4/Lib/test/test_cd.py
---- Python-2.6.4/Lib/test/test_cd.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_cd.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Whimpy test script for the cd module
-    Roger E. Masse
- """
-diff -u Python-2.6.4/Lib/test/test_cl.py.orig Python-2.6.4/Lib/test/test_cl.py
---- Python-2.6.4/Lib/test/test_cl.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_cl.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Whimpy test script for the cl module
-    Roger E. Masse
- """
-diff -u Python-2.6.4/Lib/test/test_imgfile.py.orig Python-2.6.4/Lib/test/test_imgfile.py
---- Python-2.6.4/Lib/test/test_imgfile.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_imgfile.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Simple test script for imgfile.c
-    Roger E. Masse
-diff -u Python-2.6.4/Lib/test/test_random.py.orig Python-2.6.4/Lib/test/test_random.py
---- Python-2.6.4/Lib/test/test_random.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_random.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- import random
-diff -u Python-2.6.4/Lib/test/curses_tests.py.orig Python-2.6.4/Lib/test/curses_tests.py
---- Python-2.6.4/Lib/test/curses_tests.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/curses_tests.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $
- #
-diff -u Python-2.6.4/Lib/test/test_codecmaps_cn.py.orig Python-2.6.4/Lib/test/test_codecmaps_cn.py
---- Python-2.6.4/Lib/test/test_codecmaps_cn.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_codecmaps_cn.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecmaps_cn.py
- #   Codec mapping tests for PRC encodings
-diff -u Python-2.6.4/Lib/test/test_whichdb.py.orig Python-2.6.4/Lib/test/test_whichdb.py
---- Python-2.6.4/Lib/test/test_whichdb.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/test/test_whichdb.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the whichdb module
-    based on test_anydbm.py
- """
-diff -u Python-2.6.4/Lib/test/test_eof.py.orig Python-2.6.4/Lib/test/test_eof.py
---- Python-2.6.4/Lib/test/test_eof.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_eof.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """test script for a few new invalid token catches"""
- 
- import unittest
-diff -u Python-2.6.4/Lib/test/test_imageop.py.orig Python-2.6.4/Lib/test/test_imageop.py
---- Python-2.6.4/Lib/test/test_imageop.py.orig	Mon Feb 21 10:46:31 2011
-+++ Python-2.6.4/Lib/test/test_imageop.py	Mon Feb 21 10:46:31 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Test script for the imageop module.  This has the side
-    effect of partially testing the imgfile module as well.
-diff -u Python-2.6.4/Lib/test/test_codecmaps_tw.py.orig Python-2.6.4/Lib/test/test_codecmaps_tw.py
---- Python-2.6.4/Lib/test/test_codecmaps_tw.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_codecmaps_tw.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecmaps_tw.py
- #   Codec mapping tests for ROC encodings
-diff -u Python-2.6.4/Lib/test/test_codecencodings_hk.py.orig Python-2.6.4/Lib/test/test_codecencodings_hk.py
---- Python-2.6.4/Lib/test/test_codecencodings_hk.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_codecencodings_hk.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecencodings_hk.py
- #   Codec encoding tests for HongKong encodings.
-diff -u Python-2.6.4/Lib/test/test_codecencodings_jp.py.orig Python-2.6.4/Lib/test/test_codecencodings_jp.py
---- Python-2.6.4/Lib/test/test_codecencodings_jp.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_codecencodings_jp.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecencodings_jp.py
- #   Codec encoding tests for Japanese encodings.
-diff -u Python-2.6.4/Lib/test/test_with.py.orig Python-2.6.4/Lib/test/test_with.py
---- Python-2.6.4/Lib/test/test_with.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_with.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Unit tests for the with statement specified in PEP 343."""
- 
-diff -u Python-2.6.4/Lib/test/crashers/recursive_call.py.orig Python-2.6.4/Lib/test/crashers/recursive_call.py
---- Python-2.6.4/Lib/test/crashers/recursive_call.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/crashers/recursive_call.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # No bug report AFAIK, mail on python-dev on 2006-01-10
- 
-diff -u Python-2.6.4/Lib/test/test_codecmaps_kr.py.orig Python-2.6.4/Lib/test/test_codecmaps_kr.py
---- Python-2.6.4/Lib/test/test_codecmaps_kr.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_codecmaps_kr.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecmaps_kr.py
- #   Codec mapping tests for ROK encodings
-diff -u Python-2.6.4/Lib/test/test_array.py.orig Python-2.6.4/Lib/test/test_array.py
---- Python-2.6.4/Lib/test/test_array.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_array.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test the arraymodule.
-    Roger E. Masse
- """
-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
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the anydbm module
-    based on testdumbdbm.py
- """
-diff -u Python-2.6.4/Lib/test/test_smtpnet.py.orig Python-2.6.4/Lib/test/test_smtpnet.py
---- Python-2.6.4/Lib/test/test_smtpnet.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_smtpnet.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- from test import test_support
-diff -u Python-2.6.4/Lib/test/test_al.py.orig Python-2.6.4/Lib/test/test_al.py
---- Python-2.6.4/Lib/test/test_al.py.orig	Mon Feb 21 10:46:31 2011
-+++ Python-2.6.4/Lib/test/test_al.py	Mon Feb 21 10:46:31 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Whimpy test script for the al module
-    Roger E. Masse
- """
-diff -u Python-2.6.4/Lib/test/test_urllib2net.py.orig Python-2.6.4/Lib/test/test_urllib2net.py
---- Python-2.6.4/Lib/test/test_urllib2net.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_urllib2net.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- from test import test_support
-diff -u Python-2.6.4/Lib/test/test_marshal.py.orig Python-2.6.4/Lib/test/test_marshal.py
---- Python-2.6.4/Lib/test/test_marshal.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_marshal.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: iso-8859-1 -*-
- 
- from test import test_support
-diff -u Python-2.6.4/Lib/test/test_urlparse.py.orig Python-2.6.4/Lib/test/test_urlparse.py
---- Python-2.6.4/Lib/test/test_urlparse.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_urlparse.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- from test import test_support
- import unittest
-diff -u Python-2.6.4/Lib/test/test_bz2.py.orig Python-2.6.4/Lib/test/test_bz2.py
---- Python-2.6.4/Lib/test/test_bz2.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_bz2.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- from test import test_support
- from test.test_support import TESTFN
- 
-diff -u Python-2.6.4/Lib/test/test_urllibnet.py.orig Python-2.6.4/Lib/test/test_urllibnet.py
---- Python-2.6.4/Lib/test/test_urllibnet.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_urllibnet.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- from test import test_support
-diff -u Python-2.6.4/Lib/test/test_logging.py.orig Python-2.6.4/Lib/test/test_logging.py
---- Python-2.6.4/Lib/test/test_logging.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_logging.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # Copyright 2001-2004 by Vinay Sajip. All Rights Reserved.
- #
-diff -u Python-2.6.4/Lib/test/test_socket.py.orig Python-2.6.4/Lib/test/test_socket.py
---- Python-2.6.4/Lib/test/test_socket.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_socket.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- from test import test_support
-diff -u Python-2.6.4/Lib/test/pystone.py.orig Python-2.6.4/Lib/test/pystone.py
---- Python-2.6.4/Lib/test/pystone.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/pystone.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- "PYSTONE" Benchmark Program
-diff -u Python-2.6.4/Lib/test/test_multibytecodec.py.orig Python-2.6.4/Lib/test/test_multibytecodec.py
---- Python-2.6.4/Lib/test/test_multibytecodec.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_multibytecodec.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_multibytecodec.py
- #   Unit test for multibytecodec itself
-diff -u Python-2.6.4/Lib/test/test_popen2.py.orig Python-2.6.4/Lib/test/test_popen2.py
---- Python-2.6.4/Lib/test/test_popen2.py.orig	Mon Feb 21 10:46:33 2011
-+++ Python-2.6.4/Lib/test/test_popen2.py	Mon Feb 21 10:46:33 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for popen2.py"""
- 
- import warnings
-diff -u Python-2.6.4/Lib/test/test_binhex.py.orig Python-2.6.4/Lib/test/test_binhex.py
---- Python-2.6.4/Lib/test/test_binhex.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_binhex.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the binhex C module
- 
-    Uses the mechanism of the python binhex module
-diff -u Python-2.6.4/Lib/test/test_gzip.py.orig Python-2.6.4/Lib/test/test_gzip.py
---- Python-2.6.4/Lib/test/test_gzip.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/test/test_gzip.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the gzip module.
- """
- 
-diff -u Python-2.6.4/Lib/test/re_tests.py.orig Python-2.6.4/Lib/test/re_tests.py
---- Python-2.6.4/Lib/test/re_tests.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/re_tests.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- mode: python -*-
- 
- # Re test suite and benchmark suite v1.5
-diff -u Python-2.6.4/Lib/test/test_urllib2_localnet.py.orig Python-2.6.4/Lib/test/test_urllib2_localnet.py
---- Python-2.6.4/Lib/test/test_urllib2_localnet.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_urllib2_localnet.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import mimetools
- import threading
-diff -u Python-2.6.4/Lib/test/test_codecencodings_kr.py.orig Python-2.6.4/Lib/test/test_codecencodings_kr.py
---- Python-2.6.4/Lib/test/test_codecencodings_kr.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_codecencodings_kr.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecencodings_kr.py
- #   Codec encoding tests for ROK encodings.
-diff -u Python-2.6.4/Lib/test/test_multibytecodec_support.py.orig Python-2.6.4/Lib/test/test_multibytecodec_support.py
---- Python-2.6.4/Lib/test/test_multibytecodec_support.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_multibytecodec_support.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_multibytecodec_support.py
- #   Common Unittest Routines for CJK codecs
-diff -u Python-2.6.4/Lib/test/test_tcl.py.orig Python-2.6.4/Lib/test/test_tcl.py
---- Python-2.6.4/Lib/test/test_tcl.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/test/test_tcl.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import unittest
- import os
-diff -u Python-2.6.4/Lib/test/test_codecencodings_cn.py.orig Python-2.6.4/Lib/test/test_codecencodings_cn.py
---- Python-2.6.4/Lib/test/test_codecencodings_cn.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_codecencodings_cn.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecencodings_cn.py
- #   Codec encoding tests for PRC encodings.
-diff -u Python-2.6.4/Lib/test/test_gl.py.orig Python-2.6.4/Lib/test/test_gl.py
---- Python-2.6.4/Lib/test/test_gl.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_gl.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Very simple test script for the SGI gl library extension module
-     taken mostly from the documentation.
-     Roger E. Masse
-diff -u Python-2.6.4/Lib/test/test___future__.py.orig Python-2.6.4/Lib/test/test___future__.py
---- Python-2.6.4/Lib/test/test___future__.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test___future__.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- import unittest
- from test import test_support
- import __future__
-diff -u Python-2.6.4/Lib/test/test_bsddb.py.orig Python-2.6.4/Lib/test/test_bsddb.py
---- Python-2.6.4/Lib/test/test_bsddb.py.orig	Mon Feb 21 10:46:36 2011
-+++ Python-2.6.4/Lib/test/test_bsddb.py	Mon Feb 21 10:46:36 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the bsddb C module by Roger E. Masse
-    Adapted to unittest format and expanded scope by Raymond Hettinger
- """
-diff -u Python-2.6.4/Lib/test/test_errno.py.orig Python-2.6.4/Lib/test/test_errno.py
---- Python-2.6.4/Lib/test/test_errno.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_errno.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test the errno module
-    Roger E. Masse
- """
-diff -u Python-2.6.4/Lib/test/test_optparse.py.orig Python-2.6.4/Lib/test/test_optparse.py
---- Python-2.6.4/Lib/test/test_optparse.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_optparse.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- 
- #
- # Test suite for Optik.  Supplied by Johannes Gijsbers
-diff -u Python-2.6.4/Lib/test/test_codecencodings_tw.py.orig Python-2.6.4/Lib/test/test_codecencodings_tw.py
---- Python-2.6.4/Lib/test/test_codecencodings_tw.py.orig	Mon Feb 21 10:46:35 2011
-+++ Python-2.6.4/Lib/test/test_codecencodings_tw.py	Mon Feb 21 10:46:35 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecencodings_tw.py
- #   Codec encoding tests for ROC encodings.
-diff -u Python-2.6.4/Lib/test/test_codecmaps_jp.py.orig Python-2.6.4/Lib/test/test_codecmaps_jp.py
---- Python-2.6.4/Lib/test/test_codecmaps_jp.py.orig	Mon Feb 21 10:46:32 2011
-+++ Python-2.6.4/Lib/test/test_codecmaps_jp.py	Mon Feb 21 10:46:32 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecmaps_jp.py
- #   Codec mapping tests for Japanese encodings
-diff -u Python-2.6.4/Lib/test/test_codecmaps_hk.py.orig Python-2.6.4/Lib/test/test_codecmaps_hk.py
---- Python-2.6.4/Lib/test/test_codecmaps_hk.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_codecmaps_hk.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # test_codecmaps_hk.py
- #   Codec mapping tests for HongKong encodings
-diff -u Python-2.6.4/Lib/test/test_dumbdbm.py.orig Python-2.6.4/Lib/test/test_dumbdbm.py
---- Python-2.6.4/Lib/test/test_dumbdbm.py.orig	Mon Feb 21 10:46:34 2011
-+++ Python-2.6.4/Lib/test/test_dumbdbm.py	Mon Feb 21 10:46:34 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Test script for the dumbdbm module
-    Original by Roger E. Masse
- """
-diff -u Python-2.6.4/Lib/tarfile.py.orig Python-2.6.4/Lib/tarfile.py
---- Python-2.6.4/Lib/tarfile.py.orig	Mon Feb 21 10:46:38 2011
-+++ Python-2.6.4/Lib/tarfile.py	Mon Feb 21 10:46:38 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: iso-8859-1 -*-
- #-------------------------------------------------------------------
- # tarfile.py
-diff -u Python-2.6.4/Lib/uu.py.orig Python-2.6.4/Lib/uu.py
---- Python-2.6.4/Lib/uu.py.orig	Mon Feb 21 10:46:25 2011
-+++ Python-2.6.4/Lib/uu.py	Mon Feb 21 10:46:25 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Copyright 1994 by Lance Ellinghouse
- # Cathedral City, California Republic, United States of America.
-diff -u Python-2.6.4/Lib/symbol.py.orig Python-2.6.4/Lib/symbol.py
---- Python-2.6.4/Lib/symbol.py.orig	Mon Feb 21 10:46:27 2011
-+++ Python-2.6.4/Lib/symbol.py	Mon Feb 21 10:46:27 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Non-terminal symbols of Python grammar (from "graminit.h")."""
- 
-diff -u Python-2.6.4/Lib/mimify.py.orig Python-2.6.4/Lib/mimify.py
---- Python-2.6.4/Lib/mimify.py.orig	Mon Feb 21 10:46:28 2011
-+++ Python-2.6.4/Lib/mimify.py	Mon Feb 21 10:46:28 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Mimification and unmimification of mail messages.
- 
-diff -u Python-2.6.4/Lib/pdb.py.orig Python-2.6.4/Lib/pdb.py
---- Python-2.6.4/Lib/pdb.py.orig	Mon Feb 21 10:46:38 2011
-+++ Python-2.6.4/Lib/pdb.py	Mon Feb 21 10:46:38 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """A Python debugger."""
- 
-diff -u Python-2.6.4/Lib/plat-mac/bundlebuilder.py.orig Python-2.6.4/Lib/plat-mac/bundlebuilder.py
---- Python-2.6.4/Lib/plat-mac/bundlebuilder.py.orig	Mon Feb 21 10:46:38 2011
-+++ Python-2.6.4/Lib/plat-mac/bundlebuilder.py	Mon Feb 21 10:46:38 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """\
- bundlebuilder.py -- Tools to assemble MacOS X (application) bundles.
-diff -u Python-2.6.4/Lib/plat-mac/appletrunner.py.orig Python-2.6.4/Lib/plat-mac/appletrunner.py
---- Python-2.6.4/Lib/plat-mac/appletrunner.py.orig	Mon Feb 21 10:46:38 2011
-+++ Python-2.6.4/Lib/plat-mac/appletrunner.py	Mon Feb 21 10:46:38 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # This file is meant as an executable script for running applets.
- # BuildApplet will use it as the main executable in the .app bundle if
- # we are not running in a framework build.
-diff -u Python-2.6.4/Demo/scripts/primes.py.orig Python-2.6.4/Demo/scripts/primes.py
---- Python-2.6.4/Demo/scripts/primes.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/primes.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Print prime numbers in a given range
- 
-diff -u Python-2.6.4/Demo/scripts/mkrcs.py.orig Python-2.6.4/Demo/scripts/mkrcs.py
---- Python-2.6.4/Demo/scripts/mkrcs.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/mkrcs.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # A rather specialized script to make sure that a symbolic link named
- # RCS exists pointing to a real RCS directory in a parallel tree
-diff -u Python-2.6.4/Demo/scripts/queens.py.orig Python-2.6.4/Demo/scripts/queens.py
---- Python-2.6.4/Demo/scripts/queens.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/queens.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """N queens problem.
- 
-diff -u Python-2.6.4/Demo/scripts/pi.py.orig Python-2.6.4/Demo/scripts/pi.py
---- Python-2.6.4/Demo/scripts/pi.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/pi.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Print digits of pi forever.
- #
-diff -u Python-2.6.4/Demo/scripts/mboxconvert.py.orig Python-2.6.4/Demo/scripts/mboxconvert.py
---- Python-2.6.4/Demo/scripts/mboxconvert.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/mboxconvert.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Convert  MH directories (1 message per file) or MMDF mailboxes (4x^A
- # delimited) to unix mailbox (From ... delimited) on stdout.
-diff -u Python-2.6.4/Demo/scripts/eqfix.py.orig Python-2.6.4/Demo/scripts/eqfix.py
---- Python-2.6.4/Demo/scripts/eqfix.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/eqfix.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Fix Python source files to use the new equality test operator, i.e.,
- #       if x = y: ...
-diff -u Python-2.6.4/Demo/scripts/find-uname.py.orig Python-2.6.4/Demo/scripts/find-uname.py
---- Python-2.6.4/Demo/scripts/find-uname.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/find-uname.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- For each argument on the command line, look for it in the set of all Unicode
-diff -u Python-2.6.4/Demo/scripts/pp.py.orig Python-2.6.4/Demo/scripts/pp.py
---- Python-2.6.4/Demo/scripts/pp.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/pp.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Emulate some Perl command line options.
- # Usage: pp [-a] [-c] [-d] [-e scriptline] [-F fieldsep] [-n] [-p] [file] ...
-diff -u Python-2.6.4/Demo/scripts/unbirthday.py.orig Python-2.6.4/Demo/scripts/unbirthday.py
---- Python-2.6.4/Demo/scripts/unbirthday.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/unbirthday.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Calculate your unbirthday count (see Alice in Wonderland).
- # This is defined as the number of days from your birth until today
-diff -u Python-2.6.4/Demo/scripts/update.py.orig Python-2.6.4/Demo/scripts/update.py
---- Python-2.6.4/Demo/scripts/update.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/update.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Update a bunch of files according to a script.
- # The input file contains lines of the form <filename>:<lineno>:<text>,
-diff -u Python-2.6.4/Demo/scripts/markov.py.orig Python-2.6.4/Demo/scripts/markov.py
---- Python-2.6.4/Demo/scripts/markov.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/markov.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- class Markov:
-     def __init__(self, histsize, choice):
-diff -u Python-2.6.4/Demo/scripts/from.py.orig Python-2.6.4/Demo/scripts/from.py
---- Python-2.6.4/Demo/scripts/from.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/from.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Print From and Subject of messages in $MAIL.
- # Extension to multiple mailboxes and other bells & whistles are left
-diff -u Python-2.6.4/Demo/scripts/script.py.orig Python-2.6.4/Demo/scripts/script.py
---- Python-2.6.4/Demo/scripts/script.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/script.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # script.py -- Make typescript of terminal session.
- # Usage:
- #       -a      Append to typescript.
-diff -u Python-2.6.4/Demo/scripts/lpwatch.py.orig Python-2.6.4/Demo/scripts/lpwatch.py
---- Python-2.6.4/Demo/scripts/lpwatch.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/lpwatch.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Watch line printer queue(s).
- # Intended for BSD 4.3 lpq.
-diff -u Python-2.6.4/Demo/scripts/fact.py.orig Python-2.6.4/Demo/scripts/fact.py
---- Python-2.6.4/Demo/scripts/fact.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/fact.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Factorize numbers.
- # The algorithm is not efficient, but easy to understand.
-diff -u Python-2.6.4/Demo/scripts/beer.py.orig Python-2.6.4/Demo/scripts/beer.py
---- Python-2.6.4/Demo/scripts/beer.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/beer.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # By GvR, demystified after a version by Fredrik Lundh.
- import sys
- n = 100
-diff -u Python-2.6.4/Demo/scripts/newslist.py.orig Python-2.6.4/Demo/scripts/newslist.py
---- Python-2.6.4/Demo/scripts/newslist.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/newslist.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- #######################################################################
- # Newslist  $Revision: 66429 $
- #
-diff -u Python-2.6.4/Demo/scripts/ftpstats.py.orig Python-2.6.4/Demo/scripts/ftpstats.py
---- Python-2.6.4/Demo/scripts/ftpstats.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/ftpstats.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Extract statistics from ftp daemon log.
- 
-diff -u Python-2.6.4/Demo/scripts/makedir.py.orig Python-2.6.4/Demo/scripts/makedir.py
---- Python-2.6.4/Demo/scripts/makedir.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/scripts/makedir.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Like mkdir, but also make intermediate directories if necessary.
- # It is not an error if the given directory already exists (as long
-diff -u Python-2.6.4/Demo/turtle/tdemo_clock.py.orig Python-2.6.4/Demo/turtle/tdemo_clock.py
---- Python-2.6.4/Demo/turtle/tdemo_clock.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_clock.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- # -*- coding: cp1252 -*-
- """       turtle-example-suite:
- 
-diff -u Python-2.6.4/Demo/turtle/tdemo_planet_and_moon.py.orig Python-2.6.4/Demo/turtle/tdemo_planet_and_moon.py
---- Python-2.6.4/Demo/turtle/tdemo_planet_and_moon.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_planet_and_moon.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-         tdemo_planets_and_moon.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_lindenmayer_indian.py.orig Python-2.6.4/Demo/turtle/tdemo_lindenmayer_indian.py
---- Python-2.6.4/Demo/turtle/tdemo_lindenmayer_indian.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_lindenmayer_indian.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-         xtx_lindenmayer_indian.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_penrose.py.orig Python-2.6.4/Demo/turtle/tdemo_penrose.py
---- Python-2.6.4/Demo/turtle/tdemo_penrose.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_penrose.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       xturtle-example-suite:
- 
-           xtx_kites_and_darts.py
-diff -u Python-2.6.4/Demo/turtle/turtleDemo.py.orig Python-2.6.4/Demo/turtle/turtleDemo.py
---- Python-2.6.4/Demo/turtle/turtleDemo.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/turtleDemo.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- import sys
- import os
- 
-diff -u Python-2.6.4/Demo/turtle/tdemo_yinyang.py.orig Python-2.6.4/Demo/turtle/tdemo_yinyang.py
---- Python-2.6.4/Demo/turtle/tdemo_yinyang.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_yinyang.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-             tdemo_yinyang.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_tree.py.orig Python-2.6.4/Demo/turtle/tdemo_tree.py
---- Python-2.6.4/Demo/turtle/tdemo_tree.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_tree.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """      turtle-example-suite:
- 
-              tdemo_tree.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_fractalcurves.py.orig Python-2.6.4/Demo/turtle/tdemo_fractalcurves.py
---- Python-2.6.4/Demo/turtle/tdemo_fractalcurves.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_fractalcurves.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """      turtle-example-suite:
- 
-         tdemo_fractalCurves.py
-diff -u Python-2.6.4/Demo/turtle/turtledemo_two_canvases.py.orig Python-2.6.4/Demo/turtle/turtledemo_two_canvases.py
---- Python-2.6.4/Demo/turtle/turtledemo_two_canvases.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/turtledemo_two_canvases.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- ## DEMONSTRATES USE OF 2 CANVASES, SO CANNOT BE RUN IN DEMOVIEWER!
- """turtle example: Using TurtleScreen and RawTurtle
- for drawing on two distinct canvases.
-diff -u Python-2.6.4/Demo/turtle/tdemo_minimal_hanoi.py.orig Python-2.6.4/Demo/turtle/tdemo_minimal_hanoi.py
---- Python-2.6.4/Demo/turtle/tdemo_minimal_hanoi.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_minimal_hanoi.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-          tdemo_minimal_hanoi.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_peace.py.orig Python-2.6.4/Demo/turtle/tdemo_peace.py
---- Python-2.6.4/Demo/turtle/tdemo_peace.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_peace.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-               tdemo_peace.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_bytedesign.py.orig Python-2.6.4/Demo/turtle/tdemo_bytedesign.py
---- Python-2.6.4/Demo/turtle/tdemo_bytedesign.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_bytedesign.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """      turtle-example-suite:
- 
-         tdemo_bytedesign.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_paint.py.orig Python-2.6.4/Demo/turtle/tdemo_paint.py
---- Python-2.6.4/Demo/turtle/tdemo_paint.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_paint.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-             tdemo_paint.py
-diff -u Python-2.6.4/Demo/turtle/tdemo_I_dontlike_tiltdemo.py.orig Python-2.6.4/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
---- Python-2.6.4/Demo/turtle/tdemo_I_dontlike_tiltdemo.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/turtle/tdemo_I_dontlike_tiltdemo.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """       turtle-example-suite:
- 
-      tdemo-I_dont_like_tiltdemo.py
-diff -u Python-2.6.4/Demo/cgi/cgi1.py.orig Python-2.6.4/Demo/cgi/cgi1.py
---- Python-2.6.4/Demo/cgi/cgi1.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/cgi/cgi1.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!/usr/bin/python2.6
- 
- """CGI test 1 - check server setup."""
- 
-diff -u Python-2.6.4/Demo/cgi/cgi3.py.orig Python-2.6.4/Demo/cgi/cgi3.py
---- Python-2.6.4/Demo/cgi/cgi3.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/cgi/cgi3.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!/usr/bin/python2.6
- 
- """CGI test 3 (persistent data)."""
- 
-diff -u Python-2.6.4/Demo/cgi/cgi2.py.orig Python-2.6.4/Demo/cgi/cgi2.py
---- Python-2.6.4/Demo/cgi/cgi2.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/cgi/cgi2.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!/usr/bin/python2.6
- 
- """CGI test 2 - basic use of cgi module."""
- 
-diff -u Python-2.6.4/Demo/comparisons/sortingtest.py.orig Python-2.6.4/Demo/comparisons/sortingtest.py
---- Python-2.6.4/Demo/comparisons/sortingtest.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/comparisons/sortingtest.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # 2)  Sorting Test
- #
-diff -u Python-2.6.4/Demo/comparisons/regextest.py.orig Python-2.6.4/Demo/comparisons/regextest.py
---- Python-2.6.4/Demo/comparisons/regextest.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/comparisons/regextest.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # 1)  Regular Expressions Test
- #
-diff -u Python-2.6.4/Demo/comparisons/systemtest.py.orig Python-2.6.4/Demo/comparisons/systemtest.py
---- Python-2.6.4/Demo/comparisons/systemtest.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/comparisons/systemtest.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # 3)  System Test
- #
-diff -u Python-2.6.4/Demo/pysvr/pysvr.py.orig Python-2.6.4/Demo/pysvr/pysvr.py
---- Python-2.6.4/Demo/pysvr/pysvr.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/pysvr/pysvr.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """A multi-threaded telnet-like server that gives a Python prompt.
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/sortvisu.py.orig Python-2.6.4/Demo/tkinter/guido/sortvisu.py
---- Python-2.6.4/Demo/tkinter/guido/sortvisu.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/sortvisu.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Sorting algorithms visualizer using Tkinter.
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/dialog.py.orig Python-2.6.4/Demo/tkinter/guido/dialog.py
---- Python-2.6.4/Demo/tkinter/guido/dialog.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/dialog.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # A Python function that generates dialog boxes with a text message,
- # optional bitmap, and any number of buttons.
-diff -u Python-2.6.4/Demo/tkinter/guido/electrons.py.orig Python-2.6.4/Demo/tkinter/guido/electrons.py
---- Python-2.6.4/Demo/tkinter/guido/electrons.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/electrons.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Simulate "electrons" migrating across the screen.
- # An optional bitmap file in can be in the background.
-diff -u Python-2.6.4/Demo/tkinter/guido/newmenubardemo.py.orig Python-2.6.4/Demo/tkinter/guido/newmenubardemo.py
---- Python-2.6.4/Demo/tkinter/guido/newmenubardemo.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/newmenubardemo.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Play with the new Tk 8.0 toplevel menu option."""
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/canvasevents.py.orig Python-2.6.4/Demo/tkinter/guido/canvasevents.py
---- Python-2.6.4/Demo/tkinter/guido/canvasevents.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/canvasevents.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- from Tkinter import *
- from Canvas import Oval, Group, CanvasText
-diff -u Python-2.6.4/Demo/tkinter/guido/tkman.py.orig Python-2.6.4/Demo/tkinter/guido/tkman.py
---- Python-2.6.4/Demo/tkinter/guido/tkman.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/tkman.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Tk man page browser -- currently only shows the Tcl/Tk man pages
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/solitaire.py.orig Python-2.6.4/Demo/tkinter/guido/solitaire.py
---- Python-2.6.4/Demo/tkinter/guido/solitaire.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/solitaire.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Solitaire game, much like the one that comes with MS Windows.
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/kill.py.orig Python-2.6.4/Demo/tkinter/guido/kill.py
---- Python-2.6.4/Demo/tkinter/guido/kill.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/kill.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # Tkinter interface to Linux `kill' command.
- 
- from Tkinter import *
-diff -u Python-2.6.4/Demo/tkinter/guido/MimeViewer.py.orig Python-2.6.4/Demo/tkinter/guido/MimeViewer.py
---- Python-2.6.4/Demo/tkinter/guido/MimeViewer.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/MimeViewer.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # View a single MIME multipart message.
- # Display each part as a box.
-diff -u Python-2.6.4/Demo/tkinter/guido/mbox.py.orig Python-2.6.4/Demo/tkinter/guido/mbox.py
---- Python-2.6.4/Demo/tkinter/guido/mbox.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/mbox.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Scan MH folder, display results in window
- 
-diff -u Python-2.6.4/Demo/tkinter/guido/rmt.py.orig Python-2.6.4/Demo/tkinter/guido/rmt.py
---- Python-2.6.4/Demo/tkinter/guido/rmt.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/rmt.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # A Python program implementing rmt, an application for remotely
- # controlling other Tk applications.
-diff -u Python-2.6.4/Demo/tkinter/guido/svkill.py.orig Python-2.6.4/Demo/tkinter/guido/svkill.py
---- Python-2.6.4/Demo/tkinter/guido/svkill.py.orig	Mon Feb 21 10:46:39 2011
-+++ Python-2.6.4/Demo/tkinter/guido/svkill.py	Mon Feb 21 10:46:39 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Tkinter interface to SYSV `ps' and `kill' commands.
- 
-diff -u Python-2.6.4/Demo/pdist/rrcs.py.orig Python-2.6.4/Demo/pdist/rrcs.py
---- Python-2.6.4/Demo/pdist/rrcs.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/pdist/rrcs.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- "Remote RCS -- command line interface"
- 
-diff -u Python-2.6.4/Demo/pdist/rcvs.py.orig Python-2.6.4/Demo/pdist/rcvs.py
---- Python-2.6.4/Demo/pdist/rcvs.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/pdist/rcvs.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Remote CVS -- command line interface"""
- 
-diff -u Python-2.6.4/Demo/pdist/RCSProxy.py.orig Python-2.6.4/Demo/pdist/RCSProxy.py
---- Python-2.6.4/Demo/pdist/RCSProxy.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/pdist/RCSProxy.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """RCS Proxy.
- 
-diff -u Python-2.6.4/Demo/pdist/makechangelog.py.orig Python-2.6.4/Demo/pdist/makechangelog.py
---- Python-2.6.4/Demo/pdist/makechangelog.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/pdist/makechangelog.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Turn a pile of RCS log output into ChangeLog file entries.
- 
-diff -u Python-2.6.4/Demo/zlib/zlibdemo.py.orig Python-2.6.4/Demo/zlib/zlibdemo.py
---- Python-2.6.4/Demo/zlib/zlibdemo.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/zlib/zlibdemo.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Takes an optional filename, defaulting to this file itself.
- # Reads the file and compresses the content using level 1 and level 9
-diff -u Python-2.6.4/Demo/zlib/minigzip.py.orig Python-2.6.4/Demo/zlib/minigzip.py
---- Python-2.6.4/Demo/zlib/minigzip.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/zlib/minigzip.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # Demo program for zlib; it compresses or decompresses files, but *doesn't*
- # delete the original.  This doesn't support all of gzip's options.
- #
-diff -u Python-2.6.4/Demo/curses/life.py.orig Python-2.6.4/Demo/curses/life.py
---- Python-2.6.4/Demo/curses/life.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/curses/life.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # life.py -- A curses-based version of Conway's Game of Life.
- # Contributed by AMK
- #
-diff -u Python-2.6.4/Demo/curses/rain.py.orig Python-2.6.4/Demo/curses/rain.py
---- Python-2.6.4/Demo/curses/rain.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/curses/rain.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # $Id: rain.py 46625 2006-06-03 23:02:15Z andrew.kuchling $
- #
-diff -u Python-2.6.4/Demo/curses/repeat.py.orig Python-2.6.4/Demo/curses/repeat.py
---- Python-2.6.4/Demo/curses/repeat.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/curses/repeat.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """repeat <shell-command>
- 
-diff -u Python-2.6.4/Demo/curses/ncurses.py.orig Python-2.6.4/Demo/curses/ncurses.py
---- Python-2.6.4/Demo/curses/ncurses.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/curses/ncurses.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # $Id: ncurses.py 66424 2008-09-13 01:22:08Z andrew.kuchling $
- #
-diff -u Python-2.6.4/Demo/curses/tclock.py.orig Python-2.6.4/Demo/curses/tclock.py
---- Python-2.6.4/Demo/curses/tclock.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/curses/tclock.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # $Id: tclock.py 46626 2006-06-03 23:07:21Z andrew.kuchling $
- #
-diff -u Python-2.6.4/Demo/parser/test_parser.py.orig Python-2.6.4/Demo/parser/test_parser.py
---- Python-2.6.4/Demo/parser/test_parser.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/parser/test_parser.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- #  (Force the script to use the latest build.)
- #
- #  test_parser.py
-diff -u Python-2.6.4/Demo/sockets/gopher.py.orig Python-2.6.4/Demo/sockets/gopher.py
---- Python-2.6.4/Demo/sockets/gopher.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/gopher.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # A simple gopher client.
- #
-diff -u Python-2.6.4/Demo/sockets/throughput.py.orig Python-2.6.4/Demo/sockets/throughput.py
---- Python-2.6.4/Demo/sockets/throughput.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/throughput.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Test network throughput.
- #
-diff -u Python-2.6.4/Demo/sockets/rpython.py.orig Python-2.6.4/Demo/sockets/rpython.py
---- Python-2.6.4/Demo/sockets/rpython.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/rpython.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Remote python client.
- # Execute Python commands remotely and send output back.
-diff -u Python-2.6.4/Demo/sockets/echosvr.py.orig Python-2.6.4/Demo/sockets/echosvr.py
---- Python-2.6.4/Demo/sockets/echosvr.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/echosvr.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Python implementation of an 'echo' tcp server: echo all data it receives.
- #
-diff -u Python-2.6.4/Demo/sockets/telnet.py.orig Python-2.6.4/Demo/sockets/telnet.py
---- Python-2.6.4/Demo/sockets/telnet.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/telnet.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Minimal interface to the Internet telnet protocol.
- #
-diff -u Python-2.6.4/Demo/sockets/finger.py.orig Python-2.6.4/Demo/sockets/finger.py
---- Python-2.6.4/Demo/sockets/finger.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/finger.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Python interface to the Internet finger daemon.
- #
-diff -u Python-2.6.4/Demo/sockets/udpecho.py.orig Python-2.6.4/Demo/sockets/udpecho.py
---- Python-2.6.4/Demo/sockets/udpecho.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/udpecho.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Client and server for udp (datagram) echo.
- #
-diff -u Python-2.6.4/Demo/sockets/rpythond.py.orig Python-2.6.4/Demo/sockets/rpythond.py
---- Python-2.6.4/Demo/sockets/rpythond.py.orig	Mon Feb 21 10:46:40 2011
-+++ Python-2.6.4/Demo/sockets/rpythond.py	Mon Feb 21 10:46:40 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Remote python server.
- # Execute Python commands remotely and send output back.
-diff -u Python-2.6.4/Tools/ssl/get-remote-certificate.py.orig Python-2.6.4/Tools/ssl/get-remote-certificate.py
---- Python-2.6.4/Tools/ssl/get-remote-certificate.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/ssl/get-remote-certificate.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # fetch the certificate that the server(s) are providing in PEM form
- #
-diff -u Python-2.6.4/Tools/compiler/demo.py.orig Python-2.6.4/Tools/compiler/demo.py
---- Python-2.6.4/Tools/compiler/demo.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/compiler/demo.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Print names of all methods defined in module
- 
-diff -u Python-2.6.4/Tools/compiler/dumppyc.py.orig Python-2.6.4/Tools/compiler/dumppyc.py
---- Python-2.6.4/Tools/compiler/dumppyc.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/compiler/dumppyc.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import marshal
- import dis
-diff -u Python-2.6.4/Tools/webchecker/wsgui.py.orig Python-2.6.4/Tools/webchecker/wsgui.py
---- Python-2.6.4/Tools/webchecker/wsgui.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/webchecker/wsgui.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Tkinter-based GUI for websucker.
- 
-diff -u Python-2.6.4/Tools/webchecker/webchecker.py.orig Python-2.6.4/Tools/webchecker/webchecker.py
---- Python-2.6.4/Tools/webchecker/webchecker.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/webchecker/webchecker.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Original code by Guido van Rossum; extensive changes by Sam Bayer,
- # including code to check URL fragments.
-diff -u Python-2.6.4/Tools/webchecker/websucker.py.orig Python-2.6.4/Tools/webchecker/websucker.py
---- Python-2.6.4/Tools/webchecker/websucker.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/webchecker/websucker.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """A variant on webchecker that creates a mirror copy of a remote site."""
- 
-diff -u Python-2.6.4/Tools/webchecker/wcgui.py.orig Python-2.6.4/Tools/webchecker/wcgui.py
---- Python-2.6.4/Tools/webchecker/wcgui.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/webchecker/wcgui.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """GUI interface to webchecker.
- 
-diff -u Python-2.6.4/Tools/faqwiz/faqw.py.orig Python-2.6.4/Tools/faqwiz/faqw.py
---- Python-2.6.4/Tools/faqwiz/faqw.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/faqwiz/faqw.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/local/bin/python
-+#!/usr/bin/python2.6
- 
- """FAQ wizard bootstrap."""
- 
-diff -u Python-2.6.4/Tools/unicode/comparecodecs.py.orig Python-2.6.4/Tools/unicode/comparecodecs.py
---- Python-2.6.4/Tools/unicode/comparecodecs.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/unicode/comparecodecs.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """ Compare the output of two codecs.
- 
-diff -u Python-2.6.4/Tools/i18n/msgfmt.py.orig Python-2.6.4/Tools/i18n/msgfmt.py
---- Python-2.6.4/Tools/i18n/msgfmt.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/i18n/msgfmt.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: iso-8859-1 -*-
- # Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
- 
-diff -u Python-2.6.4/Tools/i18n/makelocalealias.py.orig Python-2.6.4/Tools/i18n/makelocalealias.py
---- Python-2.6.4/Tools/i18n/makelocalealias.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/i18n/makelocalealias.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- """
-     Convert the X11 locale.alias file into a mapping dictionary suitable
-     for locale.py.
-diff -u Python-2.6.4/Tools/i18n/pygettext.py.orig Python-2.6.4/Tools/i18n/pygettext.py
---- Python-2.6.4/Tools/i18n/pygettext.py.orig	Mon Feb 21 10:46:41 2011
-+++ Python-2.6.4/Tools/i18n/pygettext.py	Mon Feb 21 10:46:41 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: iso-8859-1 -*-
- # Originally written by Barry Warsaw <barry@zope.com>
- #
-diff -u Python-2.6.4/Tools/freeze/freeze.py.orig Python-2.6.4/Tools/freeze/freeze.py
---- Python-2.6.4/Tools/freeze/freeze.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/freeze/freeze.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Freeze a Python script into a binary.
- 
-diff -u Python-2.6.4/Tools/modulator/Tkextra.py.orig Python-2.6.4/Tools/modulator/Tkextra.py
---- Python-2.6.4/Tools/modulator/Tkextra.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/modulator/Tkextra.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # A Python function that generates dialog boxes with a text message,
- # optional bitmap, and any number of buttons.
-diff -u Python-2.6.4/Tools/modulator/modulator.py.orig Python-2.6.4/Tools/modulator/modulator.py
---- Python-2.6.4/Tools/modulator/modulator.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/modulator/modulator.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- #
- # Modulator - Generate skeleton modules.
- #
-diff -u Python-2.6.4/Tools/pybench/pybench.py.orig Python-2.6.4/Tools/pybench/pybench.py
---- Python-2.6.4/Tools/pybench/pybench.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/pybench/pybench.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python -O
-+#!/usr/bin/python2.6
- 
- """ A Python Benchmark Suite
- 
-diff -u Python-2.6.4/Tools/pybench/Setup.py.orig Python-2.6.4/Tools/pybench/Setup.py
---- Python-2.6.4/Tools/pybench/Setup.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/pybench/Setup.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!python
-+#!/usr/bin/python2.6
- 
- # Setup file for pybench
- #
-diff -u Python-2.6.4/Tools/pybench/clockres.py.orig Python-2.6.4/Tools/pybench/clockres.py
---- Python-2.6.4/Tools/pybench/clockres.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/pybench/clockres.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """ clockres - calculates the resolution in seconds of a given timer.
- 
-diff -u Python-2.6.4/Tools/pybench/systimes.py.orig Python-2.6.4/Tools/pybench/systimes.py
---- Python-2.6.4/Tools/pybench/systimes.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/pybench/systimes.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """ systimes() user and system timer implementations for use by
-     pybench.
-diff -u Python-2.6.4/Tools/scripts/fixheader.py.orig Python-2.6.4/Tools/scripts/fixheader.py
---- Python-2.6.4/Tools/scripts/fixheader.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/fixheader.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Add some standard cpp magic to a header file
- 
-diff -u Python-2.6.4/Tools/scripts/fixdiv.py.orig Python-2.6.4/Tools/scripts/fixdiv.py
---- Python-2.6.4/Tools/scripts/fixdiv.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/fixdiv.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """fixdiv - tool to fix division operators.
- 
-diff -u Python-2.6.4/Tools/scripts/which.py.orig Python-2.6.4/Tools/scripts/which.py
---- Python-2.6.4/Tools/scripts/which.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/which.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Variant of "which".
- # On stderr, near and total misses are reported.
-diff -u Python-2.6.4/Tools/scripts/suff.py.orig Python-2.6.4/Tools/scripts/suff.py
---- Python-2.6.4/Tools/scripts/suff.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/suff.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # suff
- #
-diff -u Python-2.6.4/Tools/scripts/pysource.py.orig Python-2.6.4/Tools/scripts/pysource.py
---- Python-2.6.4/Tools/scripts/pysource.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/pysource.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """\
- List python source files.
-diff -u Python-2.6.4/Tools/scripts/lll.py.orig Python-2.6.4/Tools/scripts/lll.py
---- Python-2.6.4/Tools/scripts/lll.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/lll.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Find symbolic links and show where they point to.
- # Arguments are directories to search; default is current directory.
-diff -u Python-2.6.4/Tools/scripts/pickle2db.py.orig Python-2.6.4/Tools/scripts/pickle2db.py
---- Python-2.6.4/Tools/scripts/pickle2db.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/pickle2db.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- Synopsis: %(prog)s [-h|-b|-g|-r|-a|-d] [ picklefile ] dbfile
-diff -u Python-2.6.4/Tools/scripts/texi2html.py.orig Python-2.6.4/Tools/scripts/texi2html.py
---- Python-2.6.4/Tools/scripts/texi2html.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/texi2html.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Convert GNU texinfo files into HTML, one file per node.
- # Based on Texinfo 2.14.
-diff -u Python-2.6.4/Tools/scripts/mkreal.py.orig Python-2.6.4/Tools/scripts/mkreal.py
---- Python-2.6.4/Tools/scripts/mkreal.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/mkreal.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # mkreal
- #
-diff -u Python-2.6.4/Tools/scripts/ftpmirror.py.orig Python-2.6.4/Tools/scripts/ftpmirror.py
---- Python-2.6.4/Tools/scripts/ftpmirror.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/ftpmirror.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Mirror a remote ftp subtree into a local directory tree.
- 
-diff -u Python-2.6.4/Tools/scripts/lfcr.py.orig Python-2.6.4/Tools/scripts/lfcr.py
---- Python-2.6.4/Tools/scripts/lfcr.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/lfcr.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- "Replace LF with CRLF in argument files.  Print names of changed files."
- 
-diff -u Python-2.6.4/Tools/scripts/ptags.py.orig Python-2.6.4/Tools/scripts/ptags.py
---- Python-2.6.4/Tools/scripts/ptags.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/ptags.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # ptags
- #
-diff -u Python-2.6.4/Tools/scripts/copytime.py.orig Python-2.6.4/Tools/scripts/copytime.py
---- Python-2.6.4/Tools/scripts/copytime.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/copytime.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Copy one file's atime and mtime to another
- 
-diff -u Python-2.6.4/Tools/scripts/finddiv.py.orig Python-2.6.4/Tools/scripts/finddiv.py
---- Python-2.6.4/Tools/scripts/finddiv.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/finddiv.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """finddiv - a grep-like tool that looks for division operators.
- 
-diff -u Python-2.6.4/Tools/scripts/combinerefs.py.orig Python-2.6.4/Tools/scripts/combinerefs.py
---- Python-2.6.4/Tools/scripts/combinerefs.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/combinerefs.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- combinerefs path
-diff -u Python-2.6.4/Tools/scripts/cvsfiles.py.orig Python-2.6.4/Tools/scripts/cvsfiles.py
---- Python-2.6.4/Tools/scripts/cvsfiles.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/cvsfiles.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Print a list of files that are mentioned in CVS directories.
- 
-diff -u Python-2.6.4/Tools/scripts/reindent.py.orig Python-2.6.4/Tools/scripts/reindent.py
---- Python-2.6.4/Tools/scripts/reindent.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/reindent.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Released to the public domain, by Tim Peters, 03 October 2000.
- 
-diff -u Python-2.6.4/Tools/scripts/checkpyc.py.orig Python-2.6.4/Tools/scripts/checkpyc.py
---- Python-2.6.4/Tools/scripts/checkpyc.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/checkpyc.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # Check that all ".pyc" files exist and are up-to-date
- # Uses module 'os'
- 
-diff -u Python-2.6.4/Tools/scripts/fixps.py.orig Python-2.6.4/Tools/scripts/fixps.py
---- Python-2.6.4/Tools/scripts/fixps.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/fixps.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Fix Python script(s) to reference the interpreter via /usr/bin/env python.
- # Warning: this overwrites the file without making a backup.
-diff -u Python-2.6.4/Tools/scripts/crlf.py.orig Python-2.6.4/Tools/scripts/crlf.py
---- Python-2.6.4/Tools/scripts/crlf.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/crlf.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- "Replace CRLF with LF in argument files.  Print names of changed files."
- 
- import sys, os
-diff -u Python-2.6.4/Tools/scripts/methfix.py.orig Python-2.6.4/Tools/scripts/methfix.py
---- Python-2.6.4/Tools/scripts/methfix.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/methfix.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Fix Python source files to avoid using
- #       def method(self, (arg1, ..., argn)):
-diff -u Python-2.6.4/Tools/scripts/classfix.py.orig Python-2.6.4/Tools/scripts/classfix.py
---- Python-2.6.4/Tools/scripts/classfix.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/classfix.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # This script is obsolete -- it is kept for historical purposes only.
- #
-diff -u Python-2.6.4/Tools/scripts/xxci.py.orig Python-2.6.4/Tools/scripts/xxci.py
---- Python-2.6.4/Tools/scripts/xxci.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/xxci.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # xxci
- #
-diff -u Python-2.6.4/Tools/scripts/findnocoding.py.orig Python-2.6.4/Tools/scripts/findnocoding.py
---- Python-2.6.4/Tools/scripts/findnocoding.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/findnocoding.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """List all those Python files that require a coding directive
- 
-diff -u Python-2.6.4/Tools/scripts/fixnotice.py.orig Python-2.6.4/Tools/scripts/fixnotice.py
---- Python-2.6.4/Tools/scripts/fixnotice.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/fixnotice.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """(Ostensibly) fix copyright notices in files.
- 
-diff -u Python-2.6.4/Tools/scripts/eptags.py.orig Python-2.6.4/Tools/scripts/eptags.py
---- Python-2.6.4/Tools/scripts/eptags.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/eptags.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Create a TAGS file for Python programs, usable with GNU Emacs.
- 
- usage: eptags pyfiles...
-diff -u Python-2.6.4/Tools/scripts/linktree.py.orig Python-2.6.4/Tools/scripts/linktree.py
---- Python-2.6.4/Tools/scripts/linktree.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/linktree.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # linktree
- #
-diff -u Python-2.6.4/Tools/scripts/checkappend.py.orig Python-2.6.4/Tools/scripts/checkappend.py
---- Python-2.6.4/Tools/scripts/checkappend.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/checkappend.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Released to the public domain, by Tim Peters, 28 February 2000.
- 
-diff -u Python-2.6.4/Tools/scripts/pindent.py.orig Python-2.6.4/Tools/scripts/pindent.py
---- Python-2.6.4/Tools/scripts/pindent.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/pindent.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # This file contains a class and a main program that perform three
- # related (though complimentary) formatting operations on Python
-diff -u Python-2.6.4/Tools/scripts/google.py.orig Python-2.6.4/Tools/scripts/google.py
---- Python-2.6.4/Tools/scripts/google.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/google.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- import sys, webbrowser
- 
-diff -u Python-2.6.4/Tools/scripts/nm2def.py.orig Python-2.6.4/Tools/scripts/nm2def.py
---- Python-2.6.4/Tools/scripts/nm2def.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/nm2def.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """nm2def.py
- 
- Helpers to extract symbols from Unix libs and auto-generate
-diff -u Python-2.6.4/Tools/scripts/md5sum.py.orig Python-2.6.4/Tools/scripts/md5sum.py
---- Python-2.6.4/Tools/scripts/md5sum.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/md5sum.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Python utility to print MD5 checksums of argument files.
- """
-diff -u Python-2.6.4/Tools/scripts/logmerge.py.orig Python-2.6.4/Tools/scripts/logmerge.py
---- Python-2.6.4/Tools/scripts/logmerge.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/logmerge.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Consolidate a bunch of CVS or RCS logs read from stdin.
- 
-diff -u Python-2.6.4/Tools/scripts/svneol.py.orig Python-2.6.4/Tools/scripts/svneol.py
---- Python-2.6.4/Tools/scripts/svneol.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/svneol.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- SVN helper script.
-diff -u Python-2.6.4/Tools/scripts/rgrep.py.orig Python-2.6.4/Tools/scripts/rgrep.py
---- Python-2.6.4/Tools/scripts/rgrep.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/rgrep.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Reverse grep.
- 
-diff -u Python-2.6.4/Tools/scripts/h2py.py.orig Python-2.6.4/Tools/scripts/h2py.py
---- Python-2.6.4/Tools/scripts/h2py.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/h2py.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Read #define's and translate to Python code.
- # Handle #include statements.
-diff -u Python-2.6.4/Tools/scripts/pathfix.py.orig Python-2.6.4/Tools/scripts/pathfix.py
---- Python-2.6.4/Tools/scripts/pathfix.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/pathfix.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Change the #! line occurring in Python scripts.  The new interpreter
- # pathname must be given with a -i option.
-diff -u Python-2.6.4/Tools/scripts/byext.py.orig Python-2.6.4/Tools/scripts/byext.py
---- Python-2.6.4/Tools/scripts/byext.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/byext.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Show file statistics by extension."""
- 
-diff -u Python-2.6.4/Tools/scripts/ifdef.py.orig Python-2.6.4/Tools/scripts/ifdef.py
---- Python-2.6.4/Tools/scripts/ifdef.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/ifdef.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Selectively preprocess #ifdef / #ifndef statements.
- # Usage:
-diff -u Python-2.6.4/Tools/scripts/treesync.py.orig Python-2.6.4/Tools/scripts/treesync.py
---- Python-2.6.4/Tools/scripts/treesync.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/treesync.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Script to synchronize two source trees.
- 
-diff -u Python-2.6.4/Tools/scripts/ndiff.py.orig Python-2.6.4/Tools/scripts/ndiff.py
---- Python-2.6.4/Tools/scripts/ndiff.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/ndiff.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Module ndiff version 1.7.0
- # Released to the public domain 08-Dec-2000,
-diff -u Python-2.6.4/Tools/scripts/findlinksto.py.orig Python-2.6.4/Tools/scripts/findlinksto.py
---- Python-2.6.4/Tools/scripts/findlinksto.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/findlinksto.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # findlinksto
- #
-diff -u Python-2.6.4/Tools/scripts/objgraph.py.orig Python-2.6.4/Tools/scripts/objgraph.py
---- Python-2.6.4/Tools/scripts/objgraph.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/objgraph.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # objgraph
- #
-diff -u Python-2.6.4/Tools/scripts/untabify.py.orig Python-2.6.4/Tools/scripts/untabify.py
---- Python-2.6.4/Tools/scripts/untabify.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/untabify.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- "Replace tabs with spaces in argument files.  Print names of changed files."
- 
-diff -u Python-2.6.4/Tools/scripts/db2pickle.py.orig Python-2.6.4/Tools/scripts/db2pickle.py
---- Python-2.6.4/Tools/scripts/db2pickle.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/db2pickle.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """
- Synopsis: %(prog)s [-h|-g|-b|-r|-a] dbfile [ picklefile ]
-diff -u Python-2.6.4/Tools/scripts/parseentities.py.orig Python-2.6.4/Tools/scripts/parseentities.py
---- Python-2.6.4/Tools/scripts/parseentities.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/parseentities.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!/usr/bin/python2.6
- """ Utility for parsing HTML entity definitions available from:
- 
-       http://www.w3.org/ as e.g.
-diff -u Python-2.6.4/Tools/scripts/dutree.py.orig Python-2.6.4/Tools/scripts/dutree.py
---- Python-2.6.4/Tools/scripts/dutree.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/dutree.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- # Format du output in a tree shape
- 
- import os, sys, errno
-diff -u Python-2.6.4/Tools/scripts/pdeps.py.orig Python-2.6.4/Tools/scripts/pdeps.py
---- Python-2.6.4/Tools/scripts/pdeps.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/pdeps.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # pdeps
- #
-diff -u Python-2.6.4/Tools/scripts/cleanfuture.py.orig Python-2.6.4/Tools/scripts/cleanfuture.py
---- Python-2.6.4/Tools/scripts/cleanfuture.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/cleanfuture.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """cleanfuture [-d][-r][-v] path ...
- 
-diff -u Python-2.6.4/Tools/scripts/hotshotmain.py.orig Python-2.6.4/Tools/scripts/hotshotmain.py
---- Python-2.6.4/Tools/scripts/hotshotmain.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/hotshotmain.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: iso-8859-1 -*-
- 
- """
-diff -u Python-2.6.4/Tools/scripts/byteyears.py.orig Python-2.6.4/Tools/scripts/byteyears.py
---- Python-2.6.4/Tools/scripts/byteyears.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/byteyears.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Print the product of age and size of each file, in suitable units.
- #
-diff -u Python-2.6.4/Tools/scripts/gprof2html.py.orig Python-2.6.4/Tools/scripts/gprof2html.py
---- Python-2.6.4/Tools/scripts/gprof2html.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/gprof2html.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python2.3
-+#!/usr/bin/python2.6
- 
- """Transform gprof(1) output into useful HTML."""
- 
-diff -u Python-2.6.4/Tools/scripts/fixcid.py.orig Python-2.6.4/Tools/scripts/fixcid.py
---- Python-2.6.4/Tools/scripts/fixcid.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/fixcid.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Perform massive identifier substitution on C source files.
- # This actually tokenizes the files (to some extent) so it can
-diff -u Python-2.6.4/Tools/scripts/reindent-rst.py.orig Python-2.6.4/Tools/scripts/reindent-rst.py
---- Python-2.6.4/Tools/scripts/reindent-rst.py.orig	Mon Feb 21 10:46:42 2011
-+++ Python-2.6.4/Tools/scripts/reindent-rst.py	Mon Feb 21 10:46:42 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- # Make a reST file compliant to our pre-commit hook.
- # Currently just remove trailing whitespace.
-diff -u Python-2.6.4/Mac/BuildScript/build-installer.py.orig Python-2.6.4/Mac/BuildScript/build-installer.py
---- Python-2.6.4/Mac/BuildScript/build-installer.py.orig	Mon Feb 21 10:46:43 2011
-+++ Python-2.6.4/Mac/BuildScript/build-installer.py	Mon Feb 21 10:46:43 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """
- This script is used to build the "official unofficial" universal build on
- Mac OS X. It requires Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK to do its
-diff -u Python-2.6.4/Mac/scripts/zappycfiles.py.orig Python-2.6.4/Mac/scripts/zappycfiles.py
---- Python-2.6.4/Mac/scripts/zappycfiles.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Mac/scripts/zappycfiles.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/python
-+#!/usr/bin/python2.6
- """Recursively zap all .pyc and .pyo files"""
- import os
- import sys
-diff -u Python-2.6.4/Mac/scripts/buildpkg.py.orig Python-2.6.4/Mac/scripts/buildpkg.py
---- Python-2.6.4/Mac/scripts/buildpkg.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Mac/scripts/buildpkg.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """buildpkg.py -- Build OS X packages for Apple's Installer.app.
- 
-diff -u Python-2.6.4/Mac/Tools/fixapplepython23.py.orig Python-2.6.4/Mac/Tools/fixapplepython23.py
---- Python-2.6.4/Mac/Tools/fixapplepython23.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Mac/Tools/fixapplepython23.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python2.6
- """fixapplepython23 - Fix Apple-installed Python 2.3 (on Mac OS X 10.3)
- 
- Python 2.3 (and 2.3.X for X<5) have the problem that building an extension
-diff -u Python-2.6.4/Misc/find_recursionlimit.py.orig Python-2.6.4/Misc/find_recursionlimit.py
---- Python-2.6.4/Misc/find_recursionlimit.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Misc/find_recursionlimit.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Find the maximum recursion limit that prevents interpreter termination.
- 
- This script finds the maximum safe recursion limit on a particular
-diff -u Python-2.6.4/Parser/asdl_c.py.orig Python-2.6.4/Parser/asdl_c.py
---- Python-2.6.4/Parser/asdl_c.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Parser/asdl_c.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python2.6
- """Generate C code from an ASDL description."""
- 
- # TO DO
-diff -u Python-2.6.4/Doc/includes/email-alternative.py.orig Python-2.6.4/Doc/includes/email-alternative.py
---- Python-2.6.4/Doc/includes/email-alternative.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Doc/includes/email-alternative.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#! /usr/bin/python
-+#!/usr/bin/python2.6
- 
- import smtplib
- 
-diff -u Python-2.6.4/Doc/includes/email-unpack.py.orig Python-2.6.4/Doc/includes/email-unpack.py
---- Python-2.6.4/Doc/includes/email-unpack.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Doc/includes/email-unpack.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Unpack a MIME message into a directory of files."""
- 
-diff -u Python-2.6.4/Doc/includes/email-dir.py.orig Python-2.6.4/Doc/includes/email-dir.py
---- Python-2.6.4/Doc/includes/email-dir.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Doc/includes/email-dir.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- 
- """Send the contents of a directory as a MIME message."""
- 
-diff -u Python-2.6.4/Doc/tools/rstlint.py.orig Python-2.6.4/Doc/tools/rstlint.py
---- Python-2.6.4/Doc/tools/rstlint.py.orig	Mon Feb 21 10:46:44 2011
-+++ Python-2.6.4/Doc/tools/rstlint.py	Mon Feb 21 10:46:44 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python2.6
- # -*- coding: utf-8 -*-
- 
- # Check for stylistic and formal issues in .rst and .py
--- old/build/python26/patches/Python26-01-solaris-lib-dirs.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,173 +0,0 @@
-diff --git Python-2.6.4/Modules/_multiprocessing/multiprocessing.h Python-2.6.4/Modules/_multiprocessing/multiprocessing.h
---- Python-2.6.4/Modules/_multiprocessing/multiprocessing.h
-+++ Python-2.6.4/Modules/_multiprocessing/multiprocessing.h
-@@ -3,6 +3,11 @@
- 
- #define PY_SSIZE_T_CLEAN
- 
-+/* needed on Solaris for the definition of CMSG_SPACE and friends */
-+#define _XOPEN_SOURCE
-+#define _XOPEN_SOURCE_EXTENDED 1
-+#define _XPG6 /* Total ugly hack */
-+
- #include "Python.h"
- #include "structmember.h"
- #include "pythread.h"
-diff --git Python-2.6.7-orig/setup.py Python-2.6.7/setup.py
---- Python-2.6.7-orig/setup.py	2010-07-17 12:31:09.000000000 +0000
-+++ Python-2.6.7/setup.py	2012-02-15 19:36:29.282697563 +0000
-@@ -355,10 +355,10 @@
-         return sys.platform
- 
-     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.include_dirs, '/usr/local/include')
--
-+        if sys.platform != 'sunos5':
-+            # Ensure that /usr/local is always used
-+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-         # Add 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
-@@ -687,11 +687,22 @@
-         exts.append( Extension('_csv', ['_csv.c']) )
- 
-         # socket(2)
-+        socket_libs = []
-+        if self.compiler.find_library_file(lib_dirs,
-+                                           'socket'):
-+            socket_libs.append('socket')
-+        if self.compiler.find_library_file(lib_dirs,
-+                                           'nsl'):
-+            socket_libs.append('nsl')
-+        if self.compiler.find_library_file(lib_dirs,
-+                                           'resolv'):
-+            socket_libs.append('resolv')
-         exts.append( Extension('_socket', ['socketmodule.c'],
--                               depends = ['socketmodule.h']) )
-+                               depends = ['socketmodule.h'],
-+                               libraries = socket_libs) )
-         # Detect SSL support for the socket module (via _ssl)
-         search_for_ssl_incs_in = [
--                              '/usr/local/ssl/include',
-+                              '/usr/sfw/include',
-                               '/usr/contrib/ssl/include/'
-                              ]
-         ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-@@ -702,8 +713,12 @@
-                                ['/usr/kerberos/include'])
-             if krb5_h:
-                 ssl_incs += krb5_h
-+        if sys.maxint == 2147483647L:
-+            sfw_libdir = '/usr/sfw/lib';
-+        else:
-+            sfw_libdir = '/usr/sfw/lib/64';
-         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
--                                     ['/usr/local/ssl/lib',
-+                                     [sfw_libdir,
-                                       '/usr/contrib/ssl/lib/'
-                                      ] )
- 
-@@ -712,6 +727,7 @@
-             exts.append( Extension('_ssl', ['_ssl.c'],
-                                    include_dirs = ssl_incs,
-                                    library_dirs = ssl_libs,
-+				   runtime_library_dirs = ssl_libs,
-                                    libraries = ['ssl', 'crypto'],
-                                    depends = ['socketmodule.h']), )
-         else:
-@@ -1191,6 +1207,16 @@
- 
-         # Curses support, requiring the System V version of curses, often
-         # provided by the ncurses library.
-+        curses_lib_dirs = []
-+        curses_inc_dirs = []
-+        if platform == 'sunos5':
-+            # look for ncurses in /usr/gnu on Solaris
-+            curses_inc_dirs.append('/usr/include/ncurses')
-+            curses_lib_dirs.append('/usr/gnu/lib')
-+            if os.path.exists('/usr/gnu/lib/sparcv9'):
-+                curses_lib_dirs.append('/usr/gnu/lib/sparcv9')
-+            else:
-+                curses_lib_dirs.append('/usr/gnu/lib/amd64')
-         panel_library = 'panel'
-         if curses_library.startswith('ncurses'):
-             if curses_library == 'ncursesw':
-@@ -1217,9 +1243,12 @@
- 
-         # If the curses module is enabled, check for the panel module
-         if (module_enabled(exts, '_curses') and
--            self.compiler.find_library_file(lib_dirs, panel_library)):
-+            self.compiler.find_library_file(lib_dirs + curses_lib_dirs, panel_library)):
-             exts.append( Extension('_curses_panel', ['_curses_panel.c'],
--                                   libraries = [panel_library] + curses_libs) )
-+                                   libraries = [panel_library] + curses_libs,
-+                                   include_dirs = curses_inc_dirs,
-+                                   library_dirs = curses_lib_dirs,
-+                                   runtime_library_dirs = curses_lib_dirs ) )
-         else:
-             missing.append('_curses_panel')
- 
-@@ -1433,8 +1462,13 @@
-                 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
- 
-         if sysconfig.get_config_var('WITH_THREAD'):
-+            multiproc_libs = []
-+            if platform == 'sunos5':
-+                multiproc_libs = [ "xnet" ]
-+
-             exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
-                                     define_macros=macros.items(),
-+                                    libraries=multiproc_libs,
-                                     include_dirs=["Modules/_multiprocessing"]))
-         else:
-             missing.append('_multiprocessing')
-@@ -1674,12 +1708,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.
-+        added_lib_dirs = []
-+        tcl_tk_lib_dirs = ['/usr/sfw/lib']
-+        tcl_tk_inc_dirs = ['/usr/sfw/include']
-         tcllib = tklib = tcl_includes = tk_includes = None
-         for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
-                         '82', '8.1', '81', '8.0', '80']:
--            tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
--            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
- 
-@@ -1697,6 +1742,7 @@
-             for dir in inc_dirs:
-                 tcl_include_sub += [dir + os.sep + "tcl" + dotversion]
-                 tk_include_sub += [dir + os.sep + "tk" + dotversion]
-+            tcl_include_sub += tcl_tk_inc_dirs
-             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)
-@@ -1761,6 +1807,7 @@
-                         include_dirs = include_dirs,
-                         libraries = libs,
-                         library_dirs = added_lib_dirs,
-+                        runtime_library_dirs = added_lib_dirs
-                         )
-         self.extensions.append(ext)
- 
-diff --git Python-2.6.4/Lib/site-packages/vendor-packages.pth Python2.6.4/Lib/site-packages/vendor-packages.pth
---- /dev/null	Sat Feb 12 00:21:26 2011
-+++ Python-2.6.4/Lib/site-packages/vendor-packages.pth	Sat Feb 12 00:47:05 2011
-@@ -0,0 +1,1 @@
-+import site; site.addsitedir('/usr/lib/python2.6/vendor-packages')
--- old/build/python26/patches/Python26-02-pycc.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,195 +0,0 @@
-diff --git Python-2.6.4/Makefile.pre.in Python-2.6.4/Makefile.pre.in
---- Python-2.6.4/Makefile.pre.in.orig	Sun Feb 13 21:00:17 2011
-+++ Python-2.6.4/Makefile.pre.in	Sun Feb 13 21:02:35 2011
-@@ -663,6 +663,8 @@
- 
- $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
- 
-+install-pycc:	$(srcdir)/pycc
-+	$(INSTALL_SCRIPT) $< $(DESTDIR)$(BINLIBDEST)
- 
- ######################################################################
- 
-@@ -728,7 +728,7 @@
-                $(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
- 
- # Install everything
--install:	@FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
-+install:	@FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@ install-pycc
- 
- # Install almost everything without disturbing previous versions
- altinstall:	@FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
-
-diff --git Python-2.6.4/pycc Python-2.6.4/pycc
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/pycc
-@@ -0,0 +1,168 @@
-+#!/bin/ksh
-+#
-+# Script for running the C/C++ compiler when building python modules
-+#
-+# CDDL HEADER START
-+#
-+# The contents of this file are subject to the terms of the
-+# Common Development and Distribution License, Version 1.0 only
-+# (the "License").  You may not use this file except in compliance
-+# with the License.
-+#
-+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+# or http://www.opensolaris.org/os/licensing.
-+# See the License for the specific language governing permissions
-+# and limitations under the License.
-+#
-+# When distributing Covered Code, include this CDDL HEADER in each
-+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+# If applicable, add the following below this CDDL HEADER, with the
-+# fields enclosed by brackets "[]" replaced with your own identifying
-+# information: Portions Copyright [yyyy] [name of copyright owner]
-+#
-+# CDDL HEADER END
-+#
-+#
-+# Copyright 2004-2005 Sun Microsystems, Inc.  All rights reserved.
-+# Use is subject to license terms.
-+#
-+
-+MYNAME=`basename $0`
-+
-+# name of the compiler executable
-+CCEXE='cc'
-+# name of the GNU compiler executable
-+GCCEXE='gcc'
-+# name of the programming language
-+CLANG='C'
-+# name of the env variable for setting the compiler path
-+CVAR='CC'
-+
-+if [ "x$PYCC_CC" != x ]; then
-+    CC="$PYCC_CC"
-+fi
-+
-+if [ "x$MYNAME" = xpyCC ]; then
-+    CCEXE='CC'
-+    GCCEXE='g++'
-+    CLANG='C++'
-+    CC="$CXX"
-+    CVAR='CXX'
-+    if [ "x$PYCC_CXX" != x ]; then
-+        CC="$PYCC_CXX"
-+    fi
-+fi
-+
-+SAVED_IFS="$IFS"
-+IFS=:
-+
-+# check if the CC env variable is set
-+if [ "x$CC" != x ]; then
-+    # verify that it doesn't point to this script
-+    if /usr/bin/cmp -s "$CC" $0; then
-+        echo "WARNING: "$CVAR" is set to this script; ignoring this value to avoid an infinite loop"
-+	CC=
-+    fi
-+fi
-+
-+# check again if the CC env variable is set
-+if [ "x$CC" != x ]; then
-+    case "$CC" in
-+	/* )
-+	    # $CC is an absolute path name
-+            # check if $CC exists
-+	    if [ ! -e "$CC" ]; then
-+		echo "WARNING: pycc: $CC not found" 1>&2
-+		CC=
-+	    else
-+        # check if $CC is an executable
-+		if [ ! -x "$CC" -o ! -f "$CC" ]; then
-+		    echo "WARNING: pycc: $CC is not an executable" 1>&2
-+		    CC=
-+		fi
-+	    fi
-+	    ;;
-+	* )
-+	    # try to find $CC in the PATH
-+	    NEW_CC=
-+	    for dir in $PATH; do
-+		if [ -x "$dir/$CC" ]; then
-+		    NEW_CC="$dir/$CC"
-+		    break
-+		fi
-+	    done
-+	    if [ "x$NEW_CC" = x ]; then
-+		echo "WARNING: pycc: $CC not found" 1>&2
-+		CC=
-+	    else
-+		CC="$NEW_CC"
-+	    fi
-+	    ;;
-+    esac
-+fi
-+
-+if [ "x$CC" = x ]; then
-+    # Look for the Sun Studio compiler in the PATH
-+    for dir in $PATH; do
-+	if [ -x "$dir/$CCEXE" ]; then
-+	    CC="$dir/$CCEXE"
-+	    break
-+	fi
-+    done
-+fi
-+
-+if [ "x$CC" = x ]; then
-+    # Look for gcc in the PATH
-+    for dir in $PATH; do
-+	if [ -x "$dir/$GCCEXE" ]; then
-+	    CC="$dir/$GCCEXE"
-+	    break
-+	fi
-+    done
-+fi
-+
-+if [ "x$CC" = x ]; then
-+    # Check for Sun Studio in /opt/SUNWspro (default install location)
-+    if [ -x /opt/SUNWspro/bin/$CCEXE ]; then
-+	CC=/opt/SUNWspro/bin/$CCEXE
-+    fi
-+fi
-+
-+if [ "x$CC" = x ]; then
-+    # Check for the GNU compiler in /usr/sfw/bin
-+    if [ -x /usr/sfw/bin/$GCCEXE ]; then
-+	CC=/usr/sfw/bin/$GCCEXE
-+    fi
-+fi
-+
-+if [ "x$CC" = x ]; then
-+    # Cannot continue without a C compiler
-+    echo "ERROR: no $CLANG compiler not found; update your PATH or set the $CVAR env variable" 1>&2
-+    exit 1
-+fi
-+
-+IFS="$SAVED_IFS"
-+
-+# We need to make some modifications to adapt correctly to compiler options
-+# that differ between GCC and Studio.
-+
-+extra_flags=
-+
-+is_gcc=no
-+
-+$CC --version >/dev/null 2>&1 && is_gcc=yes
-+
-+if [ "$is_gcc" = yes ]; then
-+	for flag in "${@}"; do
-+		# need -shared to link shared objects properly
-+		if [ "$flag" = "-G" ]; then
-+			extra_flags="$extra_flags -shared"
-+		fi
-+	done
-+	# force PIC compilation
-+	extra_flags="$extra_flags -fPIC -DPIC"
-+else
-+	extra_flags="$extra_flags -KPIC"
-+fi
-+
-+exec "$CC" $extra_flags "${@}"
--- old/build/python26/patches/Python26-03-distutils-pycc.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,26 +0,0 @@
-diff --git Python-2.6.4/Lib/distutils/sysconfig.py Python-2.6.4/Lib/distutils/sysconfig.py
---- Python-2.6.4/Lib/distutils/sysconfig.py
-+++ Python-2.6.4/Lib/distutils/sysconfig.py
-@@ -166,16 +166,12 @@
-             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-                             'CCSHARED', 'LDSHARED', 'SO')
- 
--        if 'CC' in os.environ:
--            cc = os.environ['CC']
--        if 'CXX' in os.environ:
--            cxx = os.environ['CXX']
--        if 'LDSHARED' in os.environ:
--            ldshared = os.environ['LDSHARED']
--        if 'CPP' in os.environ:
--            cpp = os.environ['CPP']
--        else:
--            cpp = cc + " -E"           # not always
-+        # On Solaris, we must always use pycc/pyCC, which will then look up
-+        # $CC and $CXX
-+        cc = '/usr/lib/python2.6/pycc'
-+        cxx = '/usr/lib/python2.6/pyCC'
-+        cpp = cc + " -E"
-+
-         if 'LDFLAGS' in os.environ:
-             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-         if 'CFLAGS' in os.environ:
--- old/build/python26/patches/Python26-04-distutils-log.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,30 +0,0 @@
-diff --git Python-2.6.4/Lib/distutils/spawn.py Python-2.6.4/Lib/distutils/spawn.py
---- Python-2.6.4/Lib/distutils/spawn.py
-+++ Python-2.6.4/Lib/distutils/spawn.py
-@@ -73,7 +73,7 @@
-     if search_path:
-         # either we find one or it stays the same
-         executable = find_executable(executable) or executable
--    log.info(string.join([executable] + cmd[1:], ' '))
-+    log.info("%s", string.join([executable] + cmd[1:], ' '))
-     if not dry_run:
-         # spawn for NT requires a full path to the .exe
-         try:
-@@ -98,7 +98,7 @@
-     if search_path:
-         # either we find one or it stays the same
-         executable = find_executable(executable) or executable
--    log.info(string.join([executable] + cmd[1:], ' '))
-+    log.info("%s", string.join([executable] + cmd[1:], ' '))
-     if not dry_run:
-         # spawnv for OS/2 EMX requires a full path to the .exe
-         try:
-@@ -119,7 +119,7 @@
-                   verbose=0,
-                   dry_run=0):
- 
--    log.info(string.join(cmd, ' '))
-+    log.info("%s", string.join(cmd, ' '))
-     if dry_run:
-         return
-     exec_fn = search_path and os.execvp or os.execv
--- old/build/python26/patches/Python26-05-isalibs.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,446 +0,0 @@
-diff -ru Python-2.6.7-orig/configure.in Python-2.6.7/configure.in
---- Python-2.6.7-orig/configure.in	2010-05-25 02:27:03.000000000 +0000
-+++ Python-2.6.7/configure.in	2012-02-15 19:54:28.504282041 +0000
-@@ -17,8 +17,44 @@
- AH_TOP([
- #ifndef Py_PYCONFIG_H
- #define Py_PYCONFIG_H
-+
- ])
- AH_BOTTOM([
-+
-+#include <sys/isa_defs.h>
-+
-+/*
-+ * Python originally defined these statically, which prevents a 32-64 python
-+ * from working at all.
-+ */
-+
-+#define SIZEOF_SHORT 2
-+#define SIZEOF_INT 4
-+#define SIZEOF_LONG_LONG 8
-+#define SIZEOF_FPOS_T 8
-+#define SIZEOF_OFF_T 8
-+#define SIZEOF_PTHREAD_T 4
-+
-+#ifdef _LP64
-+#define SIZEOF_LONG 8
-+#define SIZEOF_UINTPTR_T 8
-+#define SIZEOF_VOID_P 8
-+#define SIZEOF_TIME_T 8
-+#define SIZEOF_SIZE_T 8
-+#define SIZEOF_LONG_DOUBLE 16
-+#else
-+#define SIZEOF_LONG 4
-+#define SIZEOF_UINTPTR_T 4
-+#define SIZEOF_VOID_P 4
-+#define SIZEOF_TIME_T 4
-+#define SIZEOF_SIZE_T 4
-+#if defined(__i386)
-+#define SIZEOF_LONG_DOUBLE 12
-+#else
-+#define SIZEOF_LONG_DOUBLE 16
-+#endif
-+#endif
-+
- /* Define the macros needed if on a UnixWare 7.x system. */
- #if defined(__USLC__) && defined(__SCO_VERSION__)
- #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
-@@ -65,6 +101,26 @@
- 
- define_xopen_source=yes
- 
-+# AC_CHECK_SIZEOF without the AC_DEFINE_UNQUOTED
-+AC_DEFUN([PY_CHECK_SIZEOF],
-+[AS_LITERAL_IF([$1], [],
-+               [AC_FATAL([$0: requires literal arguments])])dnl
-+AC_CHECK_TYPE([$1], [], [], [$3])
-+AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]),
-+[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
-+  # The cast to unsigned long works around a bug in the HP C Compiler
-+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+  # This bug is HP SR number 8606223364.
-+  _AC_COMPUTE_INT([(long) (sizeof ($1))],
-+                  [AS_TR_SH([ac_cv_sizeof_$1])],
-+                  [AC_INCLUDES_DEFAULT([$3])],
-+                  [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])])
-+else
-+  AS_TR_SH([ac_cv_sizeof_$1])=0
-+fi])dnl
-+])# PY_CHECK_SIZEOF
-+
- # Arguments passed to configure.
- AC_SUBST(CONFIG_ARGS)
- CONFIG_ARGS="$ac_configure_args"
-@@ -1436,14 +1492,10 @@
- 
- # Sizes of various common basic types
- # ANSI C requires sizeof(char) == 1, so no need to check it
--AC_CHECK_SIZEOF(int, 4)
--AC_CHECK_SIZEOF(long, 4)
--AC_CHECK_SIZEOF(void *, 4)
- AC_CHECK_SIZEOF(short, 2)
- AC_CHECK_SIZEOF(float, 4)
- AC_CHECK_SIZEOF(double, 8)
--AC_CHECK_SIZEOF(fpos_t, 4)
--AC_CHECK_SIZEOF(size_t, 4)
-+AC_CHECK_SIZEOF(short)
- AC_CHECK_SIZEOF(pid_t, 4)
- 
- AC_MSG_CHECKING(for long long support)
-@@ -1453,9 +1505,6 @@
-   have_long_long=yes
- ])
- AC_MSG_RESULT($have_long_long)
--if test "$have_long_long" = yes ; then
--AC_CHECK_SIZEOF(long long, 8)
--fi
- 
- AC_MSG_CHECKING(for long double support)
- have_long_double=no
-@@ -1463,10 +1512,6 @@
-   AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
-   have_long_double=yes
- ])
--AC_MSG_RESULT($have_long_double)
--if test "$have_long_double" = yes ; then
--AC_CHECK_SIZEOF(long double, 12)
--fi
- 
- AC_MSG_CHECKING(for _Bool support)
- have_c99_bool=no
-@@ -1480,106 +1525,25 @@
- fi
- 
- AC_CHECK_TYPES(uintptr_t, 
--   [AC_CHECK_SIZEOF(uintptr_t, 4)], 
-+   [],
-    [], [#ifdef HAVE_STDINT_H
-         #include <stdint.h>
-         #endif])
- 
--
--# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
--AC_MSG_CHECKING(size of off_t)
--AC_CACHE_VAL(ac_cv_sizeof_off_t,
--[AC_TRY_RUN([#include <stdio.h>
-+PY_CHECK_SIZEOF(off_t,4,[
-+#include <stdio.h>
-+#include <stdlib.h>
- #include <sys/types.h>
--main()
--{
--  FILE *f=fopen("conftestval", "w");
--  if (!f) exit(1);
--  fprintf(f, "%d\n", sizeof(off_t));
--  exit(0);
--}],
--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
--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
--   and long long is available and at least as big as an off_t. You may need
--   to add some flags for configuration and compilation to enable this mode.
--   (For Solaris and Linux, the necessary defines are already defined.)])
--  AC_MSG_RESULT(yes)
--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,
--[AC_TRY_RUN([#include <stdio.h>
--#include <time.h>
--main()
--{
--  FILE *f=fopen("conftestval", "w");
--  if (!f) exit(1);
--  fprintf(f, "%d\n", sizeof(time_t));
--  exit(0);
--}],
--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.])
- 
-+AC_MSG_CHECKING(whether to enable large file support)
- 
--# if have pthread_t then define SIZEOF_PTHREAD_T
--ac_save_cc="$CC"
--if test "$ac_cv_kpthread" = "yes"
--then CC="$CC -Kpthread"
--elif test "$ac_cv_kthread" = "yes"
--then CC="$CC -Kthread"
--elif test "$ac_cv_pthread" = "yes"
--then CC="$CC -pthread"
--fi
--AC_MSG_CHECKING(for pthread_t)
--have_pthread_t=no
--AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
--AC_MSG_RESULT($have_pthread_t)
--if test "$have_pthread_t" = yes ; then
--  # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
--  AC_MSG_CHECKING(size of pthread_t)
--  AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
--  [AC_TRY_RUN([#include <stdio.h>
--#include <pthread.h>
--  main()
--  {
--    FILE *f=fopen("conftestval", "w");
--    if (!f) exit(1);
--    fprintf(f, "%d\n", sizeof(pthread_t));
--    exit(0);
--  }],
--  ac_cv_sizeof_pthread_t=`cat conftestval`,
--  ac_cv_sizeof_pthread_t=0,
--  ac_cv_sizeof_pthread_t=4)
--  ])
--  AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
--  AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
--   [The number of bytes in a pthread_t.])
--fi
--CC="$ac_save_cc"
-+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
-+ to add some flags for configuration and compilation to enable this mode.
-+ (For Solaris and Linux, the necessary defines are already defined.)])
-+AC_MSG_RESULT(yes)
- 
- AC_MSG_CHECKING(for --enable-toolbox-glue)
- AC_ARG_ENABLE(toolbox-glue,
-@@ -1873,12 +1837,6 @@
- if test -z "$CCSHARED"
- then
- 	case $ac_sys_system/$ac_sys_release in
--	SunOS*) if test "$GCC" = yes;
--		then CCSHARED="-fPIC";
--		elif test `uname -p` = sparc;
--		then CCSHARED="-xcode=pic32";
--		else CCSHARED="-Kpic";
--		fi;;
- 	hp*|HP*) if test "$GCC" = yes;
- 		 then CCSHARED="-fPIC";
- 		 else CCSHARED="+z";
-@@ -3383,12 +3341,6 @@
- wchar_h="no"
- )
- 
--# determine wchar_t size
--if test "$wchar_h" = yes
--then
--  AC_CHECK_SIZEOF(wchar_t, 4, [#include <wchar.h>])
--fi
--
- AC_MSG_CHECKING(for UCS-4 tcl)
- have_ucs4_tcl=no
- AC_TRY_COMPILE([
-@@ -3419,6 +3371,11 @@
-   ac_cv_wchar_t_signed=no,
-   ac_cv_wchar_t_signed=yes)])
-   AC_MSG_RESULT($ac_cv_wchar_t_signed)
-+ 
-+  PY_CHECK_SIZEOF(wchar_t, 4, [
-+  #include <wchar.h>
-+  #include <stdlib.h
-+  ])
- fi
-   
- AC_MSG_CHECKING(what type to use for unicode)
-diff -ru Python-2.6.7-orig/Lib/distutils/command/build_ext.py Python-2.6.7/Lib/distutils/command/build_ext.py
---- Python-2.6.7-orig/Lib/distutils/command/build_ext.py	2010-08-02 20:26:41.000000000 +0000
-+++ Python-2.6.7/Lib/distutils/command/build_ext.py	2012-02-15 19:44:22.648098190 +0000
-@@ -636,6 +636,8 @@
-         modpath = fullname.split('.')
-         filename = self.get_ext_filename(ext_name)
-         filename = os.path.split(filename)[-1]
-+        if sys.maxint != 2147483647L:
-+            filename = os.path.join("64", filename)
- 
-         if not self.inplace:
-             # no further work needed
-@@ -677,7 +679,13 @@
-         so_ext = get_config_var('SO')
-         if os.name == 'nt' and self.debug:
-             return os.path.join(*ext_path) + '_d' + so_ext
--        return os.path.join(*ext_path) + so_ext
-+        # .so extensions are word-size specific
-+        path = apply(os.path.join, ext_path)
-+        if sys.maxint == 2147483647L:
-+            return path + so_ext
-+        dirname = os.path.dirname(path);
-+        basename = os.path.basename(path);
-+        return os.path.join(dirname, "64", basename + so_ext)
- 
-     def get_export_symbols (self, ext):
-         """Return the list of symbols that a shared extension has to
-diff -ru Python-2.6.7-orig/Makefile.pre.in Python-2.6.7/Makefile.pre.in
---- Python-2.6.7-orig/Makefile.pre.in	2010-08-01 22:05:31.000000000 +0000
-+++ Python-2.6.7/Makefile.pre.in	2012-02-15 19:50:05.628985496 +0000
-@@ -94,11 +94,11 @@
- SCRIPTDIR=	$(prefix)/lib
- 
- # Detailed destination directories
--BINLIBDEST=	$(LIBDIR)/python$(VERSION)
-+BINLIBDEST=	$(LIBDIR)/python$(VERSION)
- LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
- INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
- CONFINCLUDEPY=	$(CONFINCLUDEDIR)/python$(VERSION)
--LIBP=		$(LIBDIR)/python$(VERSION)
-+LIBP=		$(exec_prefix)/lib/python$(VERSION)
- 
- # Symbols used for using shared libraries
- SO=		@SO@
-diff -ru Python-2.6.7-orig/Python/import.c Python-2.6.7/Python/import.c
---- Python-2.6.7-orig/Python/import.c	2010-05-20 18:41:08.000000000 +0000
-+++ Python-2.6.7/Python/import.c	2012-02-15 19:47:30.346908983 +0000
-@@ -1193,6 +1193,57 @@
- static int find_init_module(char *); /* Forward */
- static struct filedescr importhookdescr = {"", "", IMP_HOOK};
- 
-+#ifdef HAVE_STAT
-+static char *
-+insert_64dir(char *buf, size_t buflen)
-+{
-+	char *base;
-+	char *cp;
-+	size_t blen;
-+
-+	if ((blen = strlen(buf)) == 0)
-+		return (NULL);
-+
-+	cp = &buf[blen - 1];
-+	while (cp != buf && *cp != SEP)
-+		cp--;
-+
-+	if (cp != buf)
-+		cp++;
-+
-+	if (blen + strlen("64/") + 1 >= buflen)
-+		return NULL;
-+
-+	base = strdup(cp);
-+	sprintf(cp, "64%c%s", SEP, base);
-+	free(base);
-+
-+	return buf;
-+}
-+
-+/*
-+ * If we're on a 64-bit platform, modify lookups for shared object files.
-+ */
-+static size_t modify_path(struct filedescr *fdp, char *buf, size_t buflen)
-+{
-+	struct stat statbuf;
-+
-+	if (sizeof(void *) != 8)
-+		return 0;
-+
-+	if (stat(buf, &statbuf) == 0 && S_ISDIR(statbuf.st_mode))
-+		return 0;
-+
-+	if (fdp->type != C_EXTENSION)
-+		return 0;
-+
-+	if (insert_64dir(buf, buflen) == NULL)
-+		return 0;
-+
-+	return strlen("64/");
-+}
-+#endif
-+
- static struct filedescr *
- find_module(char *fullname, char *subname, PyObject *path, char *buf,
-             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;
--#endif
-+
-     if (p_loader != NULL)
-         *p_loader = NULL;
- 
-@@ -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;
--#endif /* PYOS_OS2 */
-+
-         for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
-+#ifdef HAVE_STAT
-+            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)
-@@ -1482,21 +1535,18 @@
-                     fp = NULL;
-                 }
-             }
--#if defined(PYOS_OS2)
-+
-             /* 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;
-         }
--#endif
-         Py_XDECREF(copy);
-         if (fp != NULL)
-             break;
-diff -ru Python-2.6.7-orig/Python/importdl.h Python-2.6.7/Python/importdl.h
---- Python-2.6.7-orig/Python/importdl.h	2010-05-09 15:15:40.000000000 +0000
-+++ Python-2.6.7/Python/importdl.h	2012-02-15 19:42:25.199289001 +0000
-@@ -31,8 +31,9 @@
- extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
-                                              FILE *);
- 
--/* Max length of module suffix searched for -- accommodates "module.slb" */
--#define MAXSUFFIXSIZE 12
-+/* Max length of module suffix searched for -- accommodates "module.slb"
-+   and "64/" */
-+#define MAXSUFFIXSIZE 15
- 
- #ifdef MS_WINDOWS
- #include <windows.h>
-Only in Python-2.6.7/Python: importdl.h.orig
--- old/build/python26/patches/Python26-06-write_compiled_module-atomic.patch	Mon Jan  9 12:11:37 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,84 +0,0 @@
-diff -ru Python-2.6.7-orig/Python/import.c Python-2.6.7/Python/import.c
---- Python-2.6.7-orig/Python/import.c	2010-05-20 18:41:08.000000000 +0000
-+++ Python-2.6.7/Python/import.c	2012-02-15 20:05:08.692629958 +0000
-@@ -868,8 +868,9 @@
- 
- /* Write a compiled module to a file, placing the time of last
-    modification of its source into the header.
--   Errors are ignored, if a write error occurs an attempt is made to
--   remove the file. */
-+   Write to a temporary file first so that creating the file is atomic.
-+   Errors are ignored, if a write/unlink/rename error occurs an attempt
-+   is made to remove the temporary file. */
- 
- static void
- write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
-@@ -881,12 +882,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);
- 
--    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);
-@@ -895,10 +905,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 +918,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);
- }
- 
- static void
--- old/build/python26/patches/Python26-07-dtrace.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,412 +0,0 @@
-diff -ruN Python-2.6.7-orig/Include/frameobject.h Python-2.6.7/Include/frameobject.h
---- Python-2.6.7-orig/Include/frameobject.h	2008-02-14 12:47:33.000000000 +0000
-+++ Python-2.6.7/Include/frameobject.h	2012-02-15 20:06:42.391256713 +0000
-@@ -41,6 +41,7 @@
-     /* As of 2.3 f_lineno is only valid when tracing is active (i.e. when
-        f_trace is set) -- at other times use PyCode_Addr2Line instead. */
-     int f_lineno;		/* Current line number */
-+    int f_calllineno;		/* line number of call site */
-     int f_iblock;		/* index in f_blockstack */
-     PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
-     PyObject *f_localsplus[1];	/* locals+stack, dynamically sized */
-diff -ruN Python-2.6.7-orig/Makefile.pre.in Python-2.6.7/Makefile.pre.in
---- Python-2.6.7-orig/Makefile.pre.in	2010-08-01 22:05:31.000000000 +0000
-+++ Python-2.6.7/Makefile.pre.in	2012-02-15 20:06:42.391743222 +0000
-@@ -201,6 +201,7 @@
- GRAMMAR_C=	$(srcdir)/Python/graminit.c
- GRAMMAR_INPUT=	$(srcdir)/Grammar/Grammar
- 
-+DTRACE_OBJS=Python/dtrace.o Python/phelper.o
- 
- ##########################################################################
- # Parser
-@@ -290,6 +291,7 @@
- 		Python/formatter_unicode.o \
- 		Python/formatter_string.o \
- 		Python/$(DYNLOADFILE) \
-+		$(DTRACE_OBJS) \
- 		$(LIBOBJS) \
- 		$(MACHDEP_OBJS) \
- 		$(THREADOBJ)
-@@ -577,6 +579,18 @@
- Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \
- 				$(STRINGLIB_HEADERS)
- 
-+Python/phelper.o: $(srcdir)/Python/phelper.d
-+	dtrace -o $@ -DPHELPER $(DFLAGS) $(CPPFLAGS) -C -G -s $(srcdir)/Python/phelper.d
-+
-+Python/python.h: $(srcdir)/Python/python.d
-+	dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Python/python.d
-+
-+Python/ceval.o: Python/ceval.c Python/python.h
-+	$(CC) -c $(BASECFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE -o $@ $<
-+
-+Python/dtrace.o: $(srcdir)/Python/python.d Python/ceval.o
-+	dtrace -o $@ $(DFLAGS) -C -G -s $(srcdir)/Python/python.d Python/ceval.o
-+
- ############################################################################
- # Header files
- 
-diff -ruN Python-2.6.7-orig/Objects/frameobject.c Python-2.6.7/Objects/frameobject.c
---- Python-2.6.7-orig/Objects/frameobject.c	2010-05-09 15:15:40.000000000 +0000
-+++ Python-2.6.7/Objects/frameobject.c	2012-02-15 20:10:17.527441071 +0000
-@@ -698,6 +698,7 @@
-     f->f_tstate = tstate;
- 
-     f->f_lasti = -1;
-+    f->f_calllineno = code->co_firstlineno;
-     f->f_lineno = code->co_firstlineno;
-     f->f_iblock = 0;
- 
-diff -ruN Python-2.6.7-orig/Python/ceval.c Python-2.6.7/Python/ceval.c
---- Python-2.6.7-orig/Python/ceval.c	2010-06-23 18:17:18.000000000 +0000
-+++ Python-2.6.7/Python/ceval.c	2012-02-15 20:09:36.195130867 +0000
-@@ -19,6 +19,11 @@
- 
- #include <ctype.h>
- 
-+#define HAVE_DTRACE
-+#ifdef HAVE_DTRACE
-+#include "python.h"
-+#endif
-+
- #ifndef WITH_TSC
- 
- #define READ_TIMESTAMP(var)
-@@ -546,6 +551,55 @@
-                       NULL);
- }
- 
-+#ifdef HAVE_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()
-+#define	dtrace_return()
-+#endif
- 
- /* Interpreter main loop */
- 
-@@ -557,9 +611,84 @@
-     return PyEval_EvalFrameEx(f, 0);
- }
- 
-+/*
-+ * These shenanigans look like utter madness, but what we're actually doing is
-+ * making sure that the ustack helper will see the PyFrameObject pointer on the
-+ * stack. We have two tricky cases:
-+ *
-+ * amd64
-+ *
-+ * We use up the six registers for passing arguments, meaning the call can't
-+ * use a register for passing 'f', and has to push it onto the stack in a known
-+ * location.
-+ *
-+ * And how does "throwflag" figure in to this? -PN
-+ *
-+ * SPARC
-+ *
-+ * Here the problem is that (on 32-bit) the compiler is re-using %i0 before
-+ * some calls inside PyEval_EvalFrameReal(), which means that when it's saved,
-+ * it's just some junk value rather than the real first argument. So, instead,
-+ * we trace our proxy PyEval_EvalFrame(), where we 'know' the compiler won't
-+ * decide to re-use %i0. We also need to defeat optimization of our proxy.
-+ */
-+
-+#if defined(HAVE_DTRACE)
-+
-+#if defined(__amd64)
-+PyObject *PyEval_EvalFrameExReal(long, long, long, long, long, long,
-+    PyFrameObject *, int throwflag);
-+
-+
-+
- PyObject *
- PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
- {
-+	volatile PyObject *f2;
-+	f2 = PyEval_EvalFrameExReal(0, 0, 0, 0, 0, 0, f, throwflag);
-+	return (PyObject *)f2;
-+}
-+
-+PyObject *
-+PyEval_EvalFrameExReal(long a1, long a2, long a3, long a4, long a5, long a6,
-+    PyFrameObject *f, int throwflag)
-+{
-+
-+#elif defined(__sparc)
-+
-+PyObject *PyEval_EvalFrameExReal(PyFrameObject *f, int throwflag);
-+
-+volatile int dummy;
-+
-+PyObject *
-+PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
-+{
-+	volatile PyObject *f2;
-+	f2 = PyEval_EvalFrameExReal(f, throwflag);
-+	dummy = f->ob_refcnt;
-+	return (PyObject *)f2;
-+}
-+
-+PyObject *
-+PyEval_EvalFrameExReal(PyFrameObject *f, int throwflag)
-+{
-+
-+#else /* __amd64 || __sparc */
-+
-+PyObject *
-+PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
-+{
-+
-+#endif /* __amd64 || __sparc */
-+
-+#else /* don't HAVE_DTRACE */
-+
-+PyObject *
-+PyEval_EvalFrameexEx(PyFrameObject *f, int throwflag))
-+{
-+
-+#endif /* HAVE_DTRACE */
-+
- #ifdef DXPAIRS
-     int lastopcode = 0;
- #endif
-@@ -782,6 +911,9 @@
-         }
-     }
- 
-+    if (PYTHON_FUNCTION_ENTRY_ENABLED())
-+        dtrace_entry(f);
-+
-     co = f->f_code;
-     names = co->co_names;
-     consts = co->co_consts;
-@@ -2406,6 +2538,9 @@
-             PyObject **sp;
-             PCALL(PCALL_ALL);
-             sp = stack_pointer;
-+#ifdef HAVE_DTRACE
-+            f->f_calllineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
-+#endif
- #ifdef WITH_TSC
-             x = call_function(&sp, oparg, &intr0, &intr1);
- #else
-@@ -2448,6 +2583,9 @@
-             } else
-                 Py_INCREF(func);
-             sp = stack_pointer;
-+#ifdef HAVE_DTRACE
-+            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);
-@@ -2746,6 +2884,8 @@
- 
-     /* pop frame */
- exit_eval_frame:
-+    if (PYTHON_FUNCTION_RETURN_ENABLED())
-+        dtrace_return(f);
-     Py_LeaveRecursiveCall();
-     tstate->frame = f->f_back;
- 
-diff -ruN Python-2.6.7-orig/Python/phelper.d Python-2.6.7/Python/phelper.d
---- Python-2.6.7-orig/Python/phelper.d	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/Python/phelper.d	2012-02-15 20:06:42.395929142 +0000
-@@ -0,0 +1,139 @@
-+
-+/*
-+ * Python ustack helper.  This relies on the first argument (PyFrame *) being
-+ * on the stack; see Python/ceval.c for the contortions we go through to ensure
-+ * this is the case.
-+ *
-+ * On x86, the PyFrame * is two slots up from the frame pointer; on SPARC, it's
-+ * eight.
-+ */
-+
-+/*
-+ * Yes, this is as gross as it looks. DTrace cannot handle static functions,
-+ * and our stat_impl.h has them in ILP32.
-+ */
-+#define _SYS_STAT_H
-+
-+#include <stdio.h>
-+#include <sys/types.h>
-+
-+#include "pyport.h"
-+#include "object.h"
-+#include "pystate.h"
-+#include "pyarena.h"
-+#include "pythonrun.h"
-+#include "compile.h"
-+#include "frameobject.h"
-+#include "stringobject.h"
-+
-+#if defined(__i386)
-+#define	startframe PyEval_EvalFrameEx
-+#define	endframe PyEval_EvalCodeEx
-+#elif defined(__amd64)
-+#define	PyEval_EvalFrameEx PyEval_EvalFrameExReal
-+#define	startframe PyEval_EvalFrameExReal
-+#define	endframe PyEval_EvalCodeEx
-+#elif defined(__sparc)
-+#define	PyEval_EvalFrameEx PyEval_EvalFrameExReal
-+#define	startframe PyEval_EvalFrameEx
-+#define	endframe PyEval_EvalFrameExReal
-+#endif
-+
-+#ifdef __sparcv9
-+#define	STACK_BIAS (2048-1)
-+#else
-+#define	STACK_BIAS 0
-+#endif
-+
-+/*
-+ * Not defining PHELPER lets us test this code as a normal D script.
-+ */
-+#ifdef PHELPER
-+
-+#define	at_evalframe(addr) \
-+    ((uintptr_t)addr >= ((uintptr_t)&``startframe) && \
-+     (uintptr_t)addr < ((uintptr_t)&``endframe))
-+#define	probe dtrace:helper:ustack:
-+#define	print_result(r) (r)
-+
-+#if defined(__i386) || defined(__amd64)
-+#define	frame_ptr_addr ((uintptr_t)arg1 + sizeof(uintptr_t) * 2)
-+#elif defined(__sparc)
-+#define	frame_ptr_addr ((uintptr_t)arg1 + STACK_BIAS + sizeof(uintptr_t) * 8)
-+#else
-+#error unknown architecture
-+#endif
-+
-+#else /* PHELPER */
-+
-+#define	at_evalframe(addr) (1)
-+#define	probe pid$target::PyEval_EvalFrame:entry
-+#define print_result(r) (trace(r))
-+
-+#if defined(__i386) || defined(__amd64)
-+#define	frame_ptr_addr ((uintptr_t)uregs[R_SP] + sizeof(uintptr_t))
-+#elif defined(__sparc)
-+/*
-+ * Not implemented: we could just use R_I0, but what's the point?
-+ */
-+#else
-+#error unknown architecture
-+#endif
-+
-+#endif /* PHELPER */
-+
-+extern uintptr_t PyEval_EvalFrameEx;
-+extern uintptr_t PyEval_EvalCodeEx;
-+
-+#define	copyin_obj(addr, obj) ((obj *)copyin((uintptr_t)addr, sizeof(obj)))
-+#define	pystr_addr(addr) ((char *)addr + offsetof(PyStringObject, ob_sval))
-+#define	copyin_str(dest, addr, obj) \
-+    (copyinto((uintptr_t)pystr_addr(addr), obj->ob_size, (dest)))
-+#define	add_str(addr, obj) \
-+    copyin_str(this->result + this->pos, addr, obj); \
-+    this->pos += obj->ob_size; \
-+    this->result[this->pos] = '\0';
-+#define	add_digit(nr, div) ((nr / div) ? \
-+    (this->result[this->pos++] = '0' + ((nr / div) % 10)) : \
-+    (this->result[this->pos] = '\0'))
-+#define	add_char(c) (this->result[this->pos++] = c)
-+
-+probe /at_evalframe(arg0)/ 
-+{
-+	this->framep = *(uintptr_t *)copyin(frame_ptr_addr, sizeof(uintptr_t));
-+	this->frameo = copyin_obj(this->framep, PyFrameObject);
-+	this->codep = this->frameo->f_code;
-+	this->lineno = this->frameo->f_calllineno;
-+	this->codeo = copyin_obj(this->codep, PyCodeObject);
-+	this->filenamep = this->codeo->co_filename;
-+	this->fnamep = this->codeo->co_name;
-+	this->filenameo = copyin_obj(this->filenamep, PyStringObject);
-+	this->fnameo = copyin_obj(this->fnamep, PyStringObject);
-+
-+	this->len = 1 + this->filenameo->ob_size + 1 + 5 + 2 +
-+	    this->fnameo->ob_size + 1 + 1;
-+
-+	this->result = (char *)alloca(this->len);
-+	this->pos = 0;
-+
-+	add_char('@');
-+	add_str(this->filenamep, this->filenameo);
-+	add_char(':');
-+	add_digit(this->lineno, 10000);
-+	add_digit(this->lineno, 1000);
-+	add_digit(this->lineno, 100);
-+	add_digit(this->lineno, 10);
-+	add_digit(this->lineno, 1);
-+	add_char(' ');
-+	add_char('(');
-+	add_str(this->fnamep, this->fnameo);
-+	add_char(')');
-+	this->result[this->pos] = '\0';
-+
-+	print_result(stringof(this->result));
-+}
-+
-+probe /!at_evalframe(arg0)/
-+{
-+	NULL;
-+}
-diff -ruN Python-2.6.7-orig/Python/python.d Python-2.6.7/Python/python.d
---- Python-2.6.7-orig/Python/python.d	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/Python/python.d	2012-02-15 20:06:42.396028117 +0000
-@@ -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
--- old/build/python26/patches/Python26-08-ctypes.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,28 +0,0 @@
-diff --git Python-2.6.4/Modules/_ctypes/callproc.c Python-2.6.4/Modules/_ctypes/callproc.c
---- Python-2.6.4/Modules/_ctypes/callproc.c
-+++ Python-2.6.4/Modules/_ctypes/callproc.c
-@@ -73,6 +73,8 @@
- #include <malloc.h>
- #endif
- 
-+#include <alloca.h>
-+
- #include <ffi.h>
- #include "ctypes.h"
- 
-diff --git Python-2.6.4/Modules/_ctypes/libffi/src/x86/ffitarget.h Python-2.6.4/Modules/_ctypes/libffi/src/x86/ffitarget.h
---- Python-2.6.4/Modules/_ctypes/libffi/src/x86/ffitarget.h
-+++ Python-2.6.4/Modules/_ctypes/libffi/src/x86/ffitarget.h
-@@ -54,10 +54,10 @@
- #endif
- 
-   /* ---- Intel x86 and AMD x86-64 - */
--#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
-+#if !defined(X86_WIN32) && (defined(__i386__) || defined(__i386) || defined(__x86_64__))
-   FFI_SYSV,
-   FFI_UNIX64,   /* Unix variants all use the same ABI for x86-64  */
--#ifdef __i386__
-+#if defined (__i386__) || defined (__i386)
-   FFI_DEFAULT_ABI = FFI_SYSV,
- #else
-   FFI_DEFAULT_ABI = FFI_UNIX64,
--- old/build/python26/patches/Python26-09-ucred.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,463 +0,0 @@
-diff --git Python-2.6.4/Modules/ucred.c Python-2.6.4/Modules/ucred.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/ucred.c
-@@ -0,0 +1,391 @@
-+/*
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ * DEALINGS IN THE SOFTWARE.
-+ *
-+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#include <Python.h>
-+
-+#include <stdio.h>
-+#include <priv.h>
-+#include <ucred.h>
-+#include <ctype.h>
-+#include <tsol/label.h>
-+
-+typedef struct {
-+	PyObject_HEAD
-+	ucred_t *ucred;
-+} pyucred_t;
-+
-+#define pyucred_getlongid(name, type)				\
-+	static PyObject *					\
-+	pyucred_get##name(pyucred_t *uc)			\
-+	{ 							\
-+		type val;					\
-+								\
-+		if (uc->ucred == NULL) {			\
-+			errno = EINVAL;				\
-+			PyErr_SetFromErrno(PyExc_OSError);	\
-+			return (NULL);				\
-+		}						\
-+								\
-+		if ((val = ucred_get##name(uc->ucred)) == -1) {	\
-+			PyErr_SetFromErrno(PyExc_OSError);	\
-+			return (NULL);				\
-+		}						\
-+								\
-+		return (Py_BuildValue("l", (long)val));		\
-+	}
-+
-+pyucred_getlongid(euid, uid_t)
-+pyucred_getlongid(ruid, uid_t)
-+pyucred_getlongid(suid, uid_t)
-+pyucred_getlongid(egid, gid_t)
-+pyucred_getlongid(rgid, gid_t)
-+pyucred_getlongid(sgid, gid_t)
-+pyucred_getlongid(pid, pid_t)
-+pyucred_getlongid(projid, projid_t)
-+pyucred_getlongid(zoneid, zoneid_t)
-+
-+static PyObject *
-+pyucred_getgroups(pyucred_t *uc)
-+{
-+	const gid_t *groups;
-+	PyObject *list;
-+	int len;
-+	int i;
-+
-+	if (uc->ucred == NULL) {
-+		errno = EINVAL;
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	if ((len = ucred_getgroups(uc->ucred, &groups)) == -1) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	if ((list = PyList_New(len)) == NULL)
-+		return (NULL);
-+
-+	for (i = 0; i < len; i++) {
-+		PyObject *gid = Py_BuildValue("l", (long)groups[i]);
-+		if (PyList_SetItem(list, i, gid) == -1)
-+			return (NULL);
-+	}
-+
-+	return (list);
-+}
-+
-+static PyObject *
-+pyucred_getlabel(pyucred_t *uc)
-+{
-+	m_label_t *label;
-+	PyObject *ret;
-+	char *str;
-+
-+	if (uc->ucred == NULL) {
-+		errno = EINVAL;
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	label = ucred_getlabel(uc->ucred);
-+	if (label == NULL)
-+		return (Py_BuildValue("s", ""));
-+
-+	if (label_to_str(label, &str, M_LABEL, DEF_NAMES) == -1) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	ret = Py_BuildValue("s", str);
-+	free(str);
-+	return (ret);
-+}
-+
-+static PyObject *
-+pyucred_getpflags(pyucred_t *uc, PyObject *args, PyObject *kwargs)
-+{
-+	static char *kwlist[] = { "flags", NULL };
-+	uint_t flags;
-+
-+	if (uc->ucred == NULL) {
-+		errno = EINVAL;
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist,
-+	    &flags))
-+		return (NULL);
-+
-+	if ((flags = ucred_getpflags(uc->ucred, flags)) == (uint_t)-1) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("i", flags));
-+}
-+
-+static PyObject *
-+pyucred_has_priv(pyucred_t *uc, PyObject *args, PyObject *kwargs)
-+{
-+	static char *kwlist[] = { "set", "priv", NULL };
-+	const priv_set_t *privs;
-+	const char *set;
-+	const char *priv;
-+
-+	if (uc->ucred == NULL) {
-+		errno = EINVAL;
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ss", kwlist,
-+	    &set, &priv))
-+		return (NULL);
-+
-+	if ((privs = ucred_getprivset(uc->ucred, set)) == NULL) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	if (priv_ismember(privs, priv)) {
-+		Py_INCREF(Py_True);
-+		return Py_True;
-+	}
-+
-+	Py_INCREF(Py_False);
-+	return Py_False;
-+}
-+
-+PyDoc_STRVAR(pyucred_getlabel_doc,
-+    "getlabel() -> string\n"
-+    "\n"
-+    "Return the Trusted Extensions label string, or an "
-+    "empty string if not available. The label string is "
-+    "converted using the default name and M_LABEL (human-readable). "
-+    "Raises OSError. See label_to_str(3TSOL).");
-+PyDoc_STRVAR(pyucred_getpflags_doc,
-+    "getpflags(flags) -> int\n"
-+    "\n"
-+    "Return the values of the specified privilege flags.");
-+PyDoc_STRVAR(pyucred_has_priv_doc,
-+    "has_priv(set, priv) -> bool\n"
-+    "\n"
-+    "Return true if the given privilege is set in the "
-+    "specified set. Raises OSError if the set or privilege is "
-+    "invalid, or a problem occurs.\n"
-+    "\n"
-+    "Currently, the following privilege sets are defined, as "
-+    "described in privileges(5):\n"
-+    "\n"
-+    "Effective\n"
-+    "Permitted\n"
-+    "Inheritable\n"
-+    "Limit\n");
-+
-+static PyMethodDef pyucred_methods[] = {
-+	{ "geteuid", (PyCFunction)pyucred_geteuid, METH_NOARGS,
-+	    "Return the effective user ID." },
-+	{ "getruid", (PyCFunction)pyucred_getruid, METH_NOARGS,
-+	    "Return the real user ID." },
-+	{ "getsuid", (PyCFunction)pyucred_getsuid, METH_NOARGS,
-+	    "Return the saved user ID." },
-+	{ "getegid", (PyCFunction)pyucred_getegid, METH_NOARGS,
-+	    "Return the effective group ID." },
-+	{ "getrgid", (PyCFunction)pyucred_getrgid, METH_NOARGS,
-+	    "Return the real group ID." },
-+	{ "getsgid", (PyCFunction)pyucred_getsgid, METH_NOARGS,
-+	    "Return the saved group ID." },
-+	{ "getpid", (PyCFunction)pyucred_getpid, METH_NOARGS,
-+	    "Return the effective user ID." },
-+	{ "getprojid", (PyCFunction)pyucred_getprojid, METH_NOARGS,
-+	    "Return the project ID." },
-+	{ "getzoneid", (PyCFunction)pyucred_getzoneid, METH_NOARGS,
-+	    "Return the zone ID." },
-+	{ "getgroups", (PyCFunction)pyucred_getgroups, METH_NOARGS,
-+	    "Return a list of group IDs." },
-+	{ "getlabel", (PyCFunction)pyucred_getlabel, METH_NOARGS,
-+	    pyucred_getlabel_doc },
-+	{ "getpflags", (PyCFunction)pyucred_getpflags,
-+	    METH_VARARGS|METH_KEYWORDS, pyucred_getpflags_doc },
-+	{ "has_priv", (PyCFunction)pyucred_has_priv,
-+	    METH_VARARGS|METH_KEYWORDS, pyucred_has_priv_doc },
-+	{ NULL }
-+};
-+
-+static int
-+pyucred_init(PyObject *self, PyObject *args, PyObject *kwargs)
-+{
-+	pyucred_t *uc = (pyucred_t *)self;
-+	uc->ucred = NULL;
-+	return (0);
-+}
-+
-+static void
-+pyucred_dealloc(PyObject *self)
-+{
-+	pyucred_t *uc = (pyucred_t *)self;
-+	if (uc->ucred != NULL)
-+		ucred_free(uc->ucred);
-+	self->ob_type->tp_free(self);
-+}
-+
-+static PyTypeObject pyucred_type = {
-+	PyObject_HEAD_INIT(NULL)
-+	0,                         /*ob_size*/
-+	"ucred.ucred",             /*tp_name*/
-+	sizeof (pyucred_t),        /*tp_basicsize*/
-+	0,                         /*tp_itemsize*/
-+	pyucred_dealloc,           /*tp_dealloc*/
-+	0,                         /*tp_print*/
-+	0,                         /*tp_getattr*/
-+	0,                         /*tp_setattr*/
-+	0,                         /*tp_compare*/
-+	0,                         /*tp_repr*/
-+	0,                         /*tp_as_number*/
-+	0,                         /*tp_as_sequence*/
-+	0,                         /*tp_as_mapping*/
-+	0,                         /*tp_hash */
-+	0,                         /*tp_call*/
-+	0,                         /*tp_str*/
-+	0,                         /*tp_getattro*/
-+	0,                         /*tp_setattro*/
-+	0,                         /*tp_as_buffer*/
-+	Py_TPFLAGS_DEFAULT,        /*tp_flags*/
-+	"user credentials",        /*tp_doc */
-+	0,		           /* tp_traverse */
-+	0,		           /* tp_clear */
-+	0,		           /* tp_richcompare */
-+	0,		           /* tp_weaklistoffset */
-+	0,		           /* tp_iter */
-+	0,		           /* tp_iternext */
-+	pyucred_methods,           /* tp_methods */
-+	0,                         /* tp_members */
-+	0,                         /* tp_getset */
-+	0,                         /* tp_base */
-+	0,                         /* tp_dict */
-+	0,                         /* tp_descr_get */
-+	0,                         /* tp_descr_set */
-+	0,                         /* tp_dictoffset */
-+	(initproc)pyucred_init,    /* tp_init */
-+	0,                         /* tp_alloc */
-+	0,                         /* tp_new */
-+};
-+
-+static PyObject *
-+pyucred_new(const ucred_t *uc)
-+{
-+	pyucred_t *self;
-+
-+	self = (pyucred_t *)PyObject_CallObject((PyObject *)&pyucred_type, NULL);
-+
-+	if (self == NULL)
-+		return (NULL);
-+
-+	self->ucred = (ucred_t *)uc;
-+
-+	return ((PyObject *)self);
-+}
-+
-+static PyObject *
-+pyucred_get(PyObject *o, PyObject *args, PyObject *kwargs)
-+{
-+	static char *kwlist[] = { "pid", NULL };
-+	ucred_t *ucred = NULL;
-+	int pid;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist,
-+	    &pid))
-+		return (NULL);
-+
-+	ucred = ucred_get(pid);
-+
-+	if (ucred == NULL) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	return (pyucred_new(ucred));
-+}
-+
-+static PyObject *
-+pyucred_getpeer(PyObject *o, PyObject *args, PyObject *kwargs)
-+{
-+	static char *kwlist[] = { "fd", NULL };
-+	ucred_t *ucred = NULL;
-+	int fd;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i", kwlist,
-+	    &fd))
-+		return (NULL);
-+
-+	if (getpeerucred(fd, &ucred) == -1) {
-+		PyErr_SetFromErrno(PyExc_OSError);
-+		return (NULL);
-+	}
-+
-+	return (pyucred_new(ucred));
-+}
-+
-+PyDoc_STRVAR(pyucred_get_doc,
-+    "get(pid) -> ucred\n"
-+    "\n"
-+    "Return the credentials of the specified process ID. "
-+    "Raises OSError. See ucred_get(3C).");
-+PyDoc_STRVAR(pyucred_getpeer_doc,
-+    "getpeer(fd) -> ucred\n"
-+    "\n"
-+    "Return the credentials of the peer endpoint of a "
-+    "connection-oriented socket (SOCK_STREAM) or STREAM fd "
-+    "at the time the endpoint was created or the connection "
-+    "was established. Raises OSError. See getpeerucred(3C).");
-+
-+static struct PyMethodDef pyucred_module_methods[] = {
-+	{ "get", (PyCFunction) pyucred_get,
-+	  METH_VARARGS|METH_KEYWORDS, pyucred_get_doc },
-+	{ "getpeer", (PyCFunction) pyucred_getpeer,
-+	  METH_VARARGS|METH_KEYWORDS, pyucred_getpeer_doc },
-+	{ NULL, NULL, 0, NULL }
-+};
-+
-+PyDoc_STRVAR(pyucred_module_doc,
-+    "This module provides an interface to the user credential access "
-+    "methods, obtainable either by process ID or file descriptor.");
-+   
-+PyMODINIT_FUNC
-+initucred(void)
-+{
-+	PyObject *m;
-+
-+	m = Py_InitModule3("ucred", pyucred_module_methods,
-+	    pyucred_module_doc);
-+
-+	pyucred_type.tp_new = PyType_GenericNew;
-+	if (PyType_Ready(&pyucred_type) < 0)
-+		return;
-+
-+	Py_INCREF(&pyucred_type);
-+
-+	PyModule_AddObject(m, "ucred", (PyObject *)&pyucred_type);
-+}
-diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py
---- Python-2.6.4/setup.py
-+++ Python-2.6.4/setup.py
-@@ -1277,6 +1277,13 @@
-         else:
-             missing.append('dl')
- 
-+        # ucred module (Solaris)
-+        ucred_inc = find_file('ucred.h', [], inc_dirs)
-+        tsol_inc = find_file('tsol/label.h', [], inc_dirs)
-+        if ucred_inc is not None and tsol_inc is not None:
-+            exts.append( Extension('ucred', ['ucred.c'],
-+                                   libraries = ['tsol']) )
-+
-         # Thomas Heller's _ctypes module
-         self.detect_ctypes(inc_dirs, lib_dirs)
- 
-diff --git Python-2.6.4/Lib/test/ucredtext.py Python-2.6.4/Lib/test/ucredtext.py
-new file mode 100644
---- /dev/null	2011-02-12 03:14:16.000000000 -0600
-+++ Python-2.6.4/Lib/test/ucredtest.py	2011-01-20 13:52:42.945657919 -0600
-@@ -0,0 +1,45 @@
-+#!/usr/bin/python2.6
-+
-+import ucred
-+import os
-+
-+uc = ucred.get(os.getpid())
-+
-+print "pid = %d" % uc.getpid()
-+print "euid = %d" % uc.geteuid()
-+print "ruid = %d" % uc.getruid()
-+print "suid = %d" % uc.getsuid()
-+print "egid = %d" % uc.getegid()
-+print "rgid = %d" % uc.getrgid()
-+print "sgid = %d" % uc.getsgid()
-+print "zoneid = %d" % uc.getzoneid()
-+print "projid = %d" % uc.getprojid()
-+print "groups = %s" % uc.getgroups()
-+print "label = %s" % uc.getlabel()
-+
-+print "getpflags(0x1) = %d" % uc.getpflags(0x1)
-+print "getpflags(0x2) = %d" % uc.getpflags(0x2)
-+print "has_priv(Effective, proc_fork) = %d" % uc.has_priv("Effective", "proc_fork")
-+print "has_priv(Permitted, proc_fork) = %d" % uc.has_priv("Permitted", "proc_fork")
-+print "has_priv(Inheritable, proc_fork) = %d" % uc.has_priv("Inheritable", "proc_fork")
-+print "has_priv(Limit, file_setid) = %d" % uc.has_priv("Limit", "file_setid")
-+print "has_priv(Effective, file_setid) = %d" % uc.has_priv("Effective", "file_setid")
-+try:
-+    uc.has_priv("Effective", "proc_bork")
-+except OSError, e:
-+    print e
-+try:
-+    uc.has_priv("Defective", "proc_fork")
-+except OSError, e:
-+    print e
-+try:
-+    uc.has_priv("Defective", "proc_bork")
-+except OSError, e:
-+    print e
-+
-+del uc
-+uc = ucred.ucred()
-+try:
-+    uc.getpid()
-+except OSError, e:
-+    print e
--- old/build/python26/patches/Python26-10-gethostname.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,15 +0,0 @@
-diff --git Python-2.6.4/Include/pyport.h Python-2.6.4/Include/pyport.h
---- Python-2.6.4/Include/pyport.h
-+++ Python-2.6.4/Include/pyport.h
-@@ -449,11 +449,6 @@
- in platform-specific #ifdefs.
- **************************************************************************/
- 
--#ifdef SOLARIS
--/* Unchecked */
--extern int gethostname(char *, int);
--#endif
--
- #ifdef __BEOS__
- /* Unchecked */
- /* It's in the libs, but not the headers... - [cjh] */
--- old/build/python26/patches/Python26-11-dlpi.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,1328 +0,0 @@
-diff --git Python-2.6.4/Modules/dlpimodule.c Python-2.6.4/Modules/dlpimodule.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/dlpimodule.c
-@@ -0,0 +1,1206 @@
-+/*
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to
-+ * deal in the Software without restriction, including without limitation the
-+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-+ * sell copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ * DEALINGS IN THE SOFTWARE.
-+ *
-+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#include <Python.h>
-+#include <stdio.h>
-+#include <libdlpi.h>
-+
-+typedef struct {
-+	PyObject_HEAD
-+	dlpi_handle_t dlpihdl;
-+} pylink_t;
-+
-+typedef struct {
-+	PyObject *pyfunc;
-+	PyObject *pyarg;
-+} callback_data_t;
-+
-+/*
-+ * dlpi_err: the only exception raised for libdlpi related error.
-+ * The accompanying value is:
-+ * (dlpi_error_number, string), when it's a dlpi specific error,
-+ * or, (DL_SYSERR, errno, string), when it's coming from a system call.
-+ */
-+static PyObject *dlpi_err;
-+
-+static void
-+dlpi_raise_exception(int err)
-+{
-+	PyObject *e = NULL;
-+
-+	if (err == DL_SYSERR) {
-+		e = Py_BuildValue("(iis)", DL_SYSERR, errno, strerror(errno));
-+	} else {
-+		e = Py_BuildValue("(is)", err, dlpi_strerror(err));
-+	}
-+	if (e != NULL) {
-+		PyErr_SetObject(dlpi_err, e);
-+		Py_DECREF(e);
-+	}
-+}
-+
-+PyDoc_STRVAR(link_doc,
-+    "link(linkname[, flags]) -> link object\n"
-+    "\n"
-+    "Open linkname with specified flags.\n"
-+    "Three flags are supported: PASSIVE, RAW, NATIVE.\n"
-+    "And these flags can be bitwise-OR'ed together(default flag is 0).\n"
-+    "You need sys_net_rawaccess privilege to open a link.\n"
-+    "See dlpi_open(3DLPI).\n"
-+);
-+static int
-+link_init(PyObject *self, PyObject *args, PyObject *kwds)
-+{
-+	uint_t flags = 0;
-+	dlpi_handle_t dh;
-+	char *linkname;
-+	int rval;
-+	static char *keywords[] = {"linkname", "flags", NULL};
-+	pylink_t *link = (pylink_t *)self;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|I", keywords,
-+	    &linkname, &flags))
-+		return (-1);
-+
-+	if ((rval = dlpi_open(linkname, &dh, flags)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (-1);
-+	}
-+
-+	link->dlpihdl = dh;
-+
-+	return (0);
-+}
-+
-+static void
-+link_dealloc(pylink_t *link)
-+{
-+	if (link->dlpihdl != NULL)
-+		dlpi_close(link->dlpihdl);
-+	link->ob_type->tp_free((PyObject *)link);
-+}
-+
-+PyDoc_STRVAR(bind_doc,
-+    "bind(sap) -> unsigned int\n"
-+    "\n"
-+    "Attempts to bind the link to specified SAP, or ANY_SAP.\n"
-+    "Returns the SAP that the function actually bound to, which\n"
-+    "could be different from the SAP requested.\n"
-+    "See dlpi_bind(3DLPI).\n"
-+);
-+static PyObject *
-+link_bind(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	uint_t sap = 0, boundsap = 0;
-+	static char *keywords[] = {"sap", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", keywords, &sap))
-+		return (NULL);
-+
-+	if ((rval = dlpi_bind(link->dlpihdl, sap, &boundsap)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I", boundsap));
-+}
-+
-+PyDoc_STRVAR(unbind_doc,
-+    "unbind() -> None\n"
-+    "\n"
-+    "Attempts to unbind the link from previously bound sap.\n"
-+    "See dlpi_unbind(3DLPI).\n"
-+);
-+static PyObject *
-+link_unbind(pylink_t *link)
-+{
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_unbind(link->dlpihdl)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(send_doc,
-+    "send(destaddr, message[, sap, minpri, maxpri]) -> None\n"
-+    "\n"
-+    "Attempts to send message over this link to sap on destaddr.\n"
-+    "If SAP is not specified, the bound SAP is used\n"
-+    "You can also specify priority range (minpri, maxpri).\n"
-+    "See dlpi_send(3DLPI).\n"
-+);
-+static PyObject *
-+link_send(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	char *daddr = NULL, *msgbuf = NULL;
-+	size_t daddrlen = 0, msglen = 0;
-+	t_scalar_t minpri = DL_QOS_DONT_CARE, maxpri = DL_QOS_DONT_CARE;
-+	uint_t sap = DLPI_ANY_SAP;
-+	dlpi_sendinfo_t ds, *dsp = NULL;
-+	static char *keywords[] =
-+	    {"destaddr", "message", "sap", "minpri", "maxpri", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s#s#|Iii", keywords,
-+	    &daddr, &daddrlen, &msgbuf, &msglen, &sap, &minpri, &maxpri))
-+		return (NULL);
-+
-+	if ((sap != DLPI_ANY_SAP) || (minpri != DL_QOS_DONT_CARE) ||
-+	    (maxpri != DL_QOS_DONT_CARE)) {
-+		ds.dsi_sap = sap;
-+		ds.dsi_prio.dl_min = minpri;
-+		ds.dsi_prio.dl_max = maxpri;
-+		dsp = &ds;
-+	}
-+
-+	if ((rval = dlpi_send(link->dlpihdl, daddr, daddrlen,
-+	    msgbuf, msglen, dsp)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(recv_doc,
-+    "recv(msglen[, timeout]) -> (string, string), or (None, None)\n"
-+    "\n"
-+    "Attempts to receive message over this link.\n"
-+    "You need to specify the message length for the received message.\n"
-+    "And you can specify timeout value in milliseconds.\n"
-+    "The default timeout value is -1 (wait forever).\n"
-+    "Returns (source address, message data), or (None, None) when error occurs.\n"
-+    "See dlpi_recv(3DLPI).\n"
-+);
-+static PyObject *
-+link_recv(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	PyObject *obj;
-+	char *saddr = NULL, *msgbuf = NULL;
-+	size_t saddrlen = 0, msglen = 0, *saddrlenp = NULL, *msglenp = NULL;
-+	int msec = -1; /* block until receive data */
-+	static char *keywords[] = {"msglen", "timeout", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "k|i",
-+	    keywords, &msglen, &msec))
-+		return (NULL);
-+
-+	if (msglen > 0) {
-+		msgbuf = malloc(msglen);
-+		if (msgbuf == NULL) {
-+			dlpi_raise_exception(DL_SYSERR);
-+			return (NULL);
-+		}
-+		saddrlen = DLPI_PHYSADDR_MAX;
-+		saddr = malloc(saddrlen);
-+		if (saddr == NULL) {
-+			dlpi_raise_exception(DL_SYSERR);
-+			free(msgbuf);
-+			return (NULL);
-+		}
-+		msglenp = &msglen;
-+		saddrlenp = &saddrlen;
-+	}
-+
-+	if ((rval = dlpi_recv(link->dlpihdl, saddr, saddrlenp, msgbuf,
-+	    msglenp, msec, NULL)) != DLPI_SUCCESS) {
-+		if (msgbuf != NULL)
-+			free(msgbuf);
-+		if (saddr != NULL)
-+			free(saddr);
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	obj = Py_BuildValue("s#s#", saddr, saddrlen, msgbuf, msglen);
-+	if (msgbuf != NULL)
-+		free(msgbuf);
-+	if (saddr != NULL)
-+		free(saddr);
-+	return (obj);
-+}
-+
-+PyDoc_STRVAR(disabmulti_doc,
-+    "disabmulti(address) -> None\n"
-+    "\n"
-+    "Disable a specified multicast address on this link.\n"
-+    "See dlpi_disabmulti(3DLPI).\n"
-+);
-+static PyObject *
-+link_disabmulti(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	char *addr = NULL;
-+	size_t addrlen = 0;
-+	static char *keywords[] = {"address", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s#", keywords,
-+	    &addr, &addrlen))
-+		return (NULL);
-+
-+	if ((addrlen == 0) || (addrlen > DLPI_PHYSADDR_MAX)) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_disabmulti(link->dlpihdl, addr, addrlen)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(enabmulti_doc,
-+    "enabmulti(address) -> None\n"
-+    "\n"
-+    "Enable a specified multicast address on this link.\n"
-+    "See dlpi_enabmulti(3DLPI).\n"
-+);
-+static PyObject *
-+link_enabmulti(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	char *addr = NULL;
-+	size_t addrlen = 0;
-+	static char *keywords[] = {"address", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s#", keywords,
-+	    &addr, &addrlen))
-+		return (NULL);
-+
-+	if ((addrlen == 0) || (addrlen > DLPI_PHYSADDR_MAX)) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_enabmulti(link->dlpihdl, addr, addrlen)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+static void
-+dlpi_callback(dlpi_handle_t hdl, dlpi_notifyinfo_t *ni, void *arg)
-+{
-+	callback_data_t *cd = (callback_data_t *)arg;
-+	PyObject *arglist, *result;
-+
-+	switch (ni->dni_note) {
-+	case DL_NOTE_SPEED:
-+		arglist = Py_BuildValue("(OII)",
-+		    cd->pyarg, ni->dni_note, ni->dni_speed);
-+		break;
-+	case DL_NOTE_SDU_SIZE:
-+		arglist = Py_BuildValue("(OII)",
-+		    cd->pyarg, ni->dni_note, ni->dni_size);
-+		break;
-+	case DL_NOTE_PHYS_ADDR:
-+		arglist = Py_BuildValue("(OIs#)",
-+		    cd->pyarg, ni->dni_note, ni->dni_physaddr,
-+		    ni->dni_physaddrlen);
-+		break;
-+	default:
-+		arglist = Py_BuildValue("(OIO)", cd->pyarg, ni->dni_note,
-+		    Py_None);
-+	}
-+
-+	result = PyEval_CallObject(cd->pyfunc, arglist);
-+	Py_DECREF(arglist);
-+	if (result == NULL) {
-+		PyErr_Clear(); /* cannot raise error */
-+	}
-+	Py_DECREF(result);
-+	Py_DECREF(cd->pyfunc);
-+	Py_XDECREF(cd->pyarg);
-+	free(cd);
-+}
-+
-+PyDoc_STRVAR(enabnotify_doc,
-+    "enabnotify(events, function[, arg]) -> unsigned long\n"
-+    "\n"
-+    "Enables a notification callback for the set of specified events,\n"
-+    "which must be one or more (by a logical OR) events listed as below:\n"
-+    "NOTE_LINK_DOWN         Notify when link has gone down\n"
-+    "NOTE_LINK_UP           Notify when link has come up\n"
-+    "NOTE_PHYS_ADDR         Notify when address changes\n"
-+    "NOTE_SDU_SIZE          Notify when MTU changes\n"
-+    "NOTE_SPEED             Notify when speed changes\n"
-+    "NOTE_PROMISC_ON_PHYS   Notify when PROMISC_PHYS is set\n"
-+    "NOTE_PROMISC_OFF_PHYS  Notify when PROMISC_PHYS is cleared\n"
-+    "Returns a handle for this registration.\n"
-+    "See dlpi_enabnotify(3DLPI).\n"
-+);
-+static PyObject *
-+link_enabnotify(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	PyObject *func = NULL, *arg = NULL;
-+	callback_data_t *cd;
-+	uint_t notes = 0;
-+	static char *keywords[] = {"events", "function", "arg", NULL};
-+	dlpi_notifyid_t id;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "IO|O",
-+	    keywords, &notes, &func, &arg))
-+		return (NULL);
-+
-+	if (!PyCallable_Check(func)) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	cd = malloc(sizeof(callback_data_t));
-+	if (cd == NULL) {
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+	Py_INCREF(func);
-+	Py_XINCREF(arg);
-+	cd->pyfunc = func;
-+	cd->pyarg = arg;
-+
-+	if ((rval = dlpi_enabnotify(link->dlpihdl, notes, dlpi_callback,
-+	    cd, &id)) != DLPI_SUCCESS) {
-+		free(cd);
-+		Py_DECREF(func);
-+		Py_XDECREF(arg);
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("k", id));
-+}
-+
-+PyDoc_STRVAR(disabnotify_doc,
-+    "disabnotify(handle) -> argument object, or None\n"
-+    "\n"
-+    "Disables the notification registration associated with handle.\n"
-+    "You should get this handle by calling enabnotify().\n"
-+    "Returns the argument passed in when registering the callback, or None.\n"
-+    "See dlpi_disabnotify(3DLPI).\n"
-+);
-+static PyObject *
-+link_disabnotify(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	dlpi_notifyid_t id;
-+	callback_data_t *arg;
-+	PyObject *pyargsaved;
-+	static char *keywords[] = {"handle", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "k", keywords, &id))
-+		return (NULL);
-+
-+	if ((rval = dlpi_disabnotify(link->dlpihdl, id, (void **)&arg)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	/* clean up */
-+	pyargsaved = arg->pyarg;
-+	Py_XINCREF(pyargsaved);
-+	Py_XDECREF(arg->pyarg);
-+	Py_DECREF(arg->pyfunc);
-+	free(arg);
-+
-+	if (pyargsaved != NULL)
-+		return (pyargsaved);
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(get_sap_doc,
-+    "get_sap() -> unsigned int\n"
-+    "\n"
-+    "Returns the sap bound to this link.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_sap(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I", info.di_sap));
-+}
-+
-+PyDoc_STRVAR(get_fd_doc,
-+    "get_fd() -> int\n"
-+    "\n"
-+    "Returns the integer file descriptor that can be used to directly\n"
-+    "operate on the link.\n"
-+    "See dlpi_fd(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_fd(pylink_t *link)
-+{
-+	int fd;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((fd = dlpi_fd(link->dlpihdl)) == -1) {
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("i", fd));
-+}
-+
-+PyDoc_STRVAR(get_linkname_doc,
-+    "get_linkname() -> string\n"
-+    "\n"
-+    "Returns the name of the link.\n"
-+    "See dlpi_linkname(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_linkname(pylink_t *link)
-+{
-+	const char *name = NULL;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((name = dlpi_linkname(link->dlpihdl)) == NULL) {
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("s", name));
-+}
-+
-+PyDoc_STRVAR(get_bcastaddr_doc,
-+    "get_bcastaddr() -> string, or None\n"
-+    "\n"
-+    "Returns the broadcast address of the link.\n"
-+    "Returns None if the broadcast address is empty.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_bcastaddr(pylink_t *link)
-+{
-+	char *addr[DLPI_PHYSADDR_MAX];
-+	size_t addrlen = 0;
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	if (info.di_bcastaddrlen == 0) {
-+		Py_INCREF(Py_None);
-+		return (Py_None);
-+	}
-+
-+	return (Py_BuildValue("s#", info.di_bcastaddr, info.di_bcastaddrlen));
-+}
-+
-+PyDoc_STRVAR(get_physaddr_doc,
-+    "get_physaddr(addrtype) -> string, or None\n"
-+    "\n"
-+    "Addrtype can be any one of the value listed below:\n"
-+    "FACT_PHYS_ADDR    Factory physical address\n"
-+    "CURR_PHYS_ADDR    Current physical address\n"
-+    "Returns the corresponding physical address of the link.\n"
-+    "See dlpi_get_physaddr(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_physaddr(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	char *addr[DLPI_PHYSADDR_MAX];
-+	size_t addrlen = DLPI_PHYSADDR_MAX;
-+	static char *keywords[] = {"addrtype", NULL};
-+	uint_t type;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", keywords, &type))
-+		return (NULL);
-+
-+	if ((rval = dlpi_get_physaddr(link->dlpihdl, type, addr, &addrlen)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("s#", addr, addrlen));
-+}
-+
-+PyDoc_STRVAR(set_physaddr_doc,
-+    "set_physaddr(address) -> None\n"
-+    "\n"
-+    "Sets the physical address of the link.\n"
-+    "See dlpi_set_physaddr(3DLPI).\n"
-+);
-+static PyObject *
-+link_set_physaddr(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	char *addr = NULL;
-+	size_t addrlen = 0;
-+	static char *keywords[] = {"address", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "s#", keywords,
-+	    &addr, &addrlen))
-+		return (NULL);
-+
-+	if ((rval = dlpi_set_physaddr(link->dlpihdl, DL_CURR_PHYS_ADDR,
-+	    addr, addrlen)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(promiscon_doc,
-+    "promiscon([level]) -> None\n"
-+    "\n"
-+    "Enables promiscuous mode for the link at levels:\n"
-+    "PROMISC_PHYS     Promiscuous mode at the physical level(default)\n"
-+    "PROMISC_SAP      Promiscuous mode at the SAP level\n"
-+    "PROMISC_MULTI    Promiscuous mode for all multicast addresses\n"
-+    "See dlpi_promiscon(3DLPI).\n"
-+);
-+static PyObject *
-+link_promiscon(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	uint_t level = DL_PROMISC_PHYS;
-+	static char *keywords[] = {"level", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|I", keywords, &level))
-+		return (NULL);
-+
-+	if ((rval = dlpi_promiscon(link->dlpihdl, level)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(promiscoff_doc,
-+    "promiscoff([level]) -> None\n"
-+    "\n"
-+    "Disables promiscuous mode for the link at levels:\n"
-+    "PROMISC_PHYS     Promiscuous mode at the physical level(default)\n"
-+    "PROMISC_SAP      Promiscuous mode at the SAP level\n"
-+    "PROMISC_MULTI    Promiscuous mode for all multicast addresses\n"
-+    "See dlpi_promiscoff(3DLPI).\n"
-+);
-+static PyObject *
-+link_promiscoff(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	uint_t level = DL_PROMISC_PHYS;
-+	static char *keywords[] = {"level", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "|I", keywords, &level))
-+		return (NULL);
-+
-+	if ((rval = dlpi_promiscoff(link->dlpihdl, level)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(get_timeout_doc,
-+    "get_timeout() -> int\n"
-+    "\n"
-+    "Returns current time out value of the link.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_timeout(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("i", info.di_timeout));
-+}
-+
-+PyDoc_STRVAR(get_mactype_doc,
-+    "get_mactype() -> unsigned char\n"
-+    "\n"
-+    "Returns MAC type of the link.\n"
-+    "See <sys/dlpi.h> for the list of possible MAC types.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_mactype(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("B", info.di_mactype));
-+}
-+
-+PyDoc_STRVAR(set_timeout_doc,
-+    "set_timeout(timeout) -> None\n"
-+    "\n"
-+    "Sets time out value of the link (default value: DEF_TIMEOUT).\n"
-+    "See dlpi_set_timeout(3DLPI).\n"
-+);
-+static PyObject *
-+link_set_timeout(pylink_t *link, PyObject *args, PyObject *kwds)
-+{
-+	int timeout = DLPI_DEF_TIMEOUT;
-+	static char *keywords[] = {"timeout", NULL};
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "i", keywords, &timeout))
-+		return (NULL);
-+
-+	if ((rval = dlpi_set_timeout(link->dlpihdl, timeout)) != DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	Py_INCREF(Py_None);
-+	return (Py_None);
-+}
-+
-+PyDoc_STRVAR(get_sdu_doc,
-+    "get_sdu() -> (unsigned int, unsigned int)\n"
-+    "\n"
-+    "Returns (min sdu, max sdu).\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_sdu(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("II", info.di_min_sdu, info.di_max_sdu));
-+}
-+
-+PyDoc_STRVAR(get_state_doc,
-+    "get_state() -> unsigned int\n"
-+    "\n"
-+    "Returns current state of the link (either UNBOUND or IDLE).\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_state(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I", info.di_state));
-+}
-+
-+PyDoc_STRVAR(get_qos_select_doc,
-+    "get_qos_select() -> (unsigned int, int, int, int)\n"
-+    "\n"
-+    "Returns (qos type, trans delay, priority, residul err).\n"
-+    "Unsupported QOS parameters are set to UNKNOWN.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_qos_select(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("Iiiii",
-+	    info.di_qos_sel.dl_qos_type,
-+	    info.di_qos_sel.dl_trans_delay,
-+	    info.di_qos_sel.dl_priority,
-+	    info.di_qos_sel.dl_residual_error));
-+}
-+
-+PyDoc_STRVAR(get_qos_range_doc,
-+    "get_qos_range() -> \n"
-+    "	(unsigned int, (int, int), (int, int), (int, int), int)\n"
-+    "\n"
-+    "Returns (qos type, (trans delay target, trans delay accept),\n"
-+    "(min priority, max priority), (min protection, max protection),\n"
-+    "residual err).\n"
-+    "Unsupported QOS range values are set to UNKNOWN.\n"
-+    "See dlpi_info(3DLPI).\n"
-+);
-+static PyObject *
-+link_get_qos_range(pylink_t *link)
-+{
-+	dlpi_info_t info;
-+	int rval;
-+
-+	if (link->dlpihdl == NULL) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	if ((rval = dlpi_info(link->dlpihdl, &info, 0)) !=
-+	    DLPI_SUCCESS) {
-+		dlpi_raise_exception(rval);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I(ii)(ii)(ii)i",
-+	    info.di_qos_range.dl_qos_type,
-+	    info.di_qos_range.dl_trans_delay.dl_target_value,
-+	    info.di_qos_range.dl_trans_delay.dl_accept_value,
-+	    info.di_qos_range.dl_priority.dl_min,
-+	    info.di_qos_range.dl_priority.dl_max,
-+	    info.di_qos_range.dl_protection.dl_min,
-+	    info.di_qos_range.dl_protection.dl_max,
-+	    info.di_qos_range.dl_residual_error));
-+}
-+
-+static PyMethodDef pylink_methods[] = {
-+	{"bind", (PyCFunction)link_bind, METH_VARARGS|METH_KEYWORDS, bind_doc},
-+	{"unbind", (PyCFunction)link_unbind, METH_NOARGS, unbind_doc},
-+	{"send", (PyCFunction)link_send, METH_VARARGS|METH_KEYWORDS,
-+	    send_doc},
-+	{"recv", (PyCFunction)link_recv, METH_VARARGS|METH_KEYWORDS,
-+	    recv_doc},
-+	{"disabmulti", (PyCFunction)link_disabmulti, METH_VARARGS|METH_KEYWORDS,
-+	    disabmulti_doc},
-+	{"enabmulti", (PyCFunction)link_enabmulti, METH_VARARGS|METH_KEYWORDS,
-+	    enabmulti_doc},
-+	{"enabnotify", (PyCFunction)link_enabnotify,
-+	    METH_VARARGS|METH_KEYWORDS, enabnotify_doc},
-+	{"disabnotify", (PyCFunction)link_disabnotify,
-+	    METH_VARARGS|METH_KEYWORDS, disabnotify_doc},
-+	{"get_fd", (PyCFunction)link_get_fd, METH_NOARGS, get_fd_doc},
-+	{"get_sap", (PyCFunction)link_get_sap, METH_NOARGS, get_sap_doc},
-+	{"get_mactype", (PyCFunction)link_get_mactype, METH_NOARGS,
-+	    get_mactype_doc},
-+	{"get_linkname", (PyCFunction)link_get_linkname, METH_NOARGS,
-+	    get_linkname_doc},
-+	{"get_bcastaddr", (PyCFunction)link_get_bcastaddr, METH_NOARGS,
-+	    get_bcastaddr_doc},
-+	{"get_physaddr", (PyCFunction)link_get_physaddr,
-+	    METH_VARARGS|METH_KEYWORDS, get_physaddr_doc},
-+	{"set_physaddr", (PyCFunction)link_set_physaddr,
-+	    METH_VARARGS|METH_KEYWORDS, set_physaddr_doc},
-+	{"promiscon", (PyCFunction)link_promiscon, METH_VARARGS|METH_KEYWORDS,
-+	    promiscon_doc},
-+	{"promiscoff", (PyCFunction)link_promiscoff, METH_VARARGS|METH_KEYWORDS,
-+	    promiscoff_doc},
-+	{"get_timeout", (PyCFunction)link_get_timeout, METH_NOARGS,
-+	    get_timeout_doc},
-+	{"set_timeout", (PyCFunction)link_set_timeout,
-+	    METH_VARARGS|METH_KEYWORDS, set_timeout_doc},
-+	{"get_sdu", (PyCFunction)link_get_sdu, METH_NOARGS, get_sdu_doc},
-+	{"get_state", (PyCFunction)link_get_state, METH_NOARGS,
-+	    get_state_doc},
-+	{"get_qos_select", (PyCFunction)link_get_qos_select, METH_NOARGS,
-+	    get_qos_select_doc},
-+	{"get_qos_range", (PyCFunction)link_get_qos_range, METH_NOARGS,
-+	    get_qos_range_doc},
-+	{NULL}
-+};
-+
-+static PyTypeObject pylink_type = {
-+	PyObject_HEAD_INIT(0)	/* Must fill in type value later */
-+	0,					/* ob_size */
-+	"dlpi.link",				/* tp_name */
-+	sizeof(pylink_t),			/* tp_basicsize */
-+	0,					/* tp_itemsize */
-+	(destructor)link_dealloc,		/* tp_dealloc */
-+	0,					/* tp_print */
-+	0,					/* tp_getattr */
-+	0,					/* tp_setattr */
-+	0,					/* tp_compare */
-+	0,					/* tp_repr */
-+	0,					/* tp_as_number */
-+	0,					/* tp_as_sequence */
-+	0,					/* tp_as_mapping */
-+	0,					/* tp_hash */
-+	0,					/* tp_call */
-+	0,					/* tp_str */
-+	0,					/* tp_getattro */
-+	0,					/* tp_setattro */
-+	0,					/* tp_as_buffer */
-+	Py_TPFLAGS_DEFAULT,			/* tp_flags */
-+	link_doc,				/* tp_doc */
-+	0,					/* tp_traverse */
-+	0,					/* tp_clear */
-+	0,					/* tp_richcompare */
-+	0,					/* tp_weaklistoffset */
-+	0,					/* tp_iter */
-+	0,					/* tp_iternext */
-+	pylink_methods,				/* tp_methods */
-+	0,					/* tp_members */
-+	0,					/* tp_getset */
-+	0,					/* tp_base */
-+	0,					/* tp_dict */
-+	0,					/* tp_descr_get */
-+	0,					/* tp_descr_set */
-+	0,					/* tp_dictoffset */
-+	(initproc)link_init,			/* tp_init */
-+	0,					/* tp_alloc */
-+	PyType_GenericNew,			/* tp_new */
-+	0,					/* tp_free */
-+};
-+
-+PyDoc_STRVAR(arptype_doc,
-+    "arptype(arptype) -> unsigned int\n"
-+    "\n"
-+    "Converts a DLPI MAC type to an ARP hardware type defined\n"
-+    " in <netinet/arp.h>\n"
-+    "See dlpi_arptype(3DLPI)\n"
-+);
-+static PyObject *
-+arptype(PyObject *dlpi, PyObject *args, PyObject *kwds)
-+{
-+	static char *keywords[] = {"arptype", NULL};
-+	uint_t dlpityp, arptyp;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", keywords, &dlpityp))
-+		return (NULL);
-+
-+	if ((arptyp = dlpi_arptype(dlpityp)) == 0) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I", arptyp));
-+}
-+
-+PyDoc_STRVAR(iftype_doc,
-+    "iftype(iftype) -> unsigned int\n"
-+    "\n"
-+    "Converts a DLPI MAC type to a BSD socket interface type\n"
-+    "defined in <net/if_types.h>\n"
-+    "See dlpi_iftype(3DLPI)\n"
-+);
-+static PyObject *
-+iftype(PyObject *dlpi, PyObject *args, PyObject *kwds)
-+{
-+	static char *keywords[] = {"iftype", NULL};
-+	uint_t dlpityp, iftyp;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", keywords, &dlpityp))
-+		return (NULL);
-+
-+	if ((iftyp = dlpi_iftype(dlpityp)) == 0) {
-+		errno = EINVAL;
-+		dlpi_raise_exception(DL_SYSERR);
-+		return (NULL);
-+	}
-+
-+	return (Py_BuildValue("I", iftyp));
-+}
-+
-+PyDoc_STRVAR(mactype_doc,
-+    "mactype(mactype) -> string\n"
-+    "\n"
-+    "Returns a string that describes the specified mactype.\n"
-+    "Valid mac types are defined in <sys/dlpi.h>.\n"
-+    "See dlpi_mactype(3DLPI)\n"
-+);
-+static PyObject *
-+mactype(PyObject *dlpi, PyObject *args, PyObject *kwds)
-+{
-+	static char *keywords[] = {"mactype", NULL};
-+	uint_t mactyp;
-+
-+	if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", keywords, &mactyp))
-+		return (NULL);
-+
-+	return (Py_BuildValue("s", dlpi_mactype(mactyp)));
-+}
-+
-+static boolean_t
-+link_walker(const char *name, void *arg)
-+{
-+	PyObject *linkname;
-+	PyObject *list = (PyObject *)arg;
-+
-+	if ((list == NULL) || !PyList_Check(list))
-+		return (B_FALSE);
-+
-+	linkname = Py_BuildValue("s", name);
-+	if (PyList_Append(list, linkname) == -1)
-+		return (B_TRUE);
-+
-+	Py_DECREF(linkname);
-+	return (B_FALSE);
-+}
-+
-+PyDoc_STRVAR(listlink_doc,
-+    "listlink() -> list\n"
-+    "\n"
-+    "Returns a list containing link names of all links on the system.\n"
-+);
-+static PyObject *
-+listlink(PyObject *dlpi)
-+{
-+	PyObject *list;
-+
-+	if ((list = PyList_New(0)) == NULL)
-+		return (NULL);
-+
-+	dlpi_walk(link_walker, list, 0);
-+	return (list);
-+}
-+
-+static PyMethodDef dlpi_methods[] = {
-+	{"arptype", (PyCFunction)arptype, METH_VARARGS|METH_KEYWORDS,
-+	    arptype_doc},
-+	{"iftype", (PyCFunction)iftype, METH_VARARGS|METH_KEYWORDS,
-+	    iftype_doc},
-+	{"mactype", (PyCFunction)mactype, METH_VARARGS|METH_KEYWORDS,
-+	    mactype_doc},
-+	{"listlink", (PyCFunction)listlink, METH_NOARGS, listlink_doc},
-+	{NULL}
-+};
-+
-+PyMODINIT_FUNC
-+initdlpi(void)
-+{
-+	PyObject *mod;
-+
-+	if (PyType_Ready(&pylink_type) < 0)
-+		return;
-+
-+	mod = Py_InitModule("dlpi", dlpi_methods);
-+	if (mod == NULL)
-+		return;
-+
-+	dlpi_err = PyErr_NewException("dlpi.error", NULL, NULL);
-+	if (dlpi_err == NULL)
-+		return;
-+	PyModule_AddObject(mod, "error", dlpi_err);
-+
-+	Py_INCREF(&pylink_type);
-+	PyModule_AddObject(mod, "link", (PyObject *)&pylink_type);
-+	PyModule_AddIntConstant(mod, "PASSIVE", DLPI_PASSIVE);
-+	PyModule_AddIntConstant(mod, "RAW", DLPI_RAW);
-+	PyModule_AddIntConstant(mod, "NATIVE", DLPI_NATIVE);
-+	PyModule_AddIntConstant(mod, "ANY_SAP", DLPI_ANY_SAP);
-+	PyModule_AddIntConstant(mod, "DEF_TIMEOUT", DLPI_DEF_TIMEOUT);
-+	PyModule_AddIntConstant(mod, "NOTE_LINK_DOWN", DL_NOTE_LINK_DOWN);
-+	PyModule_AddIntConstant(mod, "NOTE_LINK_UP", DL_NOTE_LINK_UP);
-+	PyModule_AddIntConstant(mod, "NOTE_PHYS_ADDR", DL_NOTE_PHYS_ADDR);
-+	PyModule_AddIntConstant(mod, "NOTE_SDU_SIZE", DL_NOTE_SDU_SIZE);
-+	PyModule_AddIntConstant(mod, "NOTE_SPEED", DL_NOTE_SPEED);
-+	PyModule_AddIntConstant(mod, "NOTE_PROMISC_ON_PHYS",
-+	    DL_NOTE_PROMISC_ON_PHYS);
-+	PyModule_AddIntConstant(mod, "NOTE_PROMISC_OFF_PHYS",
-+	    DL_NOTE_PROMISC_OFF_PHYS);
-+	PyModule_AddIntConstant(mod, "FACT_PHYS_ADDR", DL_FACT_PHYS_ADDR);
-+	PyModule_AddIntConstant(mod, "CURR_PHYS_ADDR", DL_CURR_PHYS_ADDR);
-+	PyModule_AddIntConstant(mod, "PROMISC_PHYS", DL_PROMISC_PHYS);
-+	PyModule_AddIntConstant(mod, "PROMISC_SAP", DL_PROMISC_SAP);
-+	PyModule_AddIntConstant(mod, "PROMISC_MULTI", DL_PROMISC_MULTI);
-+	PyModule_AddIntConstant(mod, "UNKNOWN", DL_UNKNOWN);
-+	PyModule_AddIntConstant(mod, "UNBOUND", DL_UNBOUND);
-+	PyModule_AddIntConstant(mod, "IDLE", DL_IDLE);
-+	PyModule_AddIntConstant(mod, "SYSERR", DL_SYSERR);
-+}
-diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py
---- Python-2.6.4/setup.py
-+++ Python-2.6.4/setup.py
-@@ -1284,6 +1284,12 @@
-             exts.append( Extension('ucred', ['ucred.c'],
-                                    libraries = ['tsol']) )
- 
-+        # dlpi module (Solaris)
-+        dlpi_inc = find_file('libdlpi.h', [], inc_dirs)
-+        if dlpi_inc is not None:
-+            exts.append( Extension('dlpi', ['dlpimodule.c'],
-+                                   libraries = ['dlpi']) )
-+
-         # Thomas Heller's _ctypes module
-         self.detect_ctypes(inc_dirs, lib_dirs)
- 
-diff --git Python-2.6.4/lib/test/dlpitest.py Python-2.6.4/Lib/test/dlpitest.py
-new file mode 100644
---- /dev/null	2011-02-12 03:13:26.000000000 -0600
-+++ Python-2.6.4/Lib/test/dlpitest.py	2011-01-20 13:52:42.895865414 -0600
-@@ -0,0 +1,96 @@
-+#!/usr/bin/python2.6
-+
-+import dlpi
-+import sys
-+import time
-+import struct
-+
-+#test listlink
-+linklist = dlpi.listlink()
-+print "Found %d links:" % len(linklist)
-+print linklist
-+
-+#pick up the first data link for below testing
-+linkname = linklist[0]
-+
-+#open link
-+print "opening link: " + linkname + "..."
-+testlink = dlpi.link(linkname)
-+
-+#read some info of testlink
-+print "linkname is %s" % testlink.get_linkname()
-+print "link fd is %d" % testlink.get_fd()
-+mactype = testlink.get_mactype()
-+print "dlpi mactype is %d" % mactype
-+print "after convert:"
-+print "\tmactype is %s" % dlpi.mactype(mactype)
-+print "\tiftype is %d" % dlpi.iftype(mactype)
-+print "\tarptype is %d" % dlpi.arptype(mactype)
-+bcastaddr = testlink.get_bcastaddr()
-+print "broadcast addr is: ",
-+print struct.unpack("BBBBBB",bcastaddr)
-+physaddr = testlink.get_physaddr(dlpi.FACT_PHYS_ADDR)
-+print "factory physical address is: ",
-+print struct.unpack("BBBBBB",physaddr)
-+print "current timeout value is %d" % testlink.get_timeout()
-+print "sdu is:",
-+print testlink.get_sdu()
-+print "qos select is:",
-+print testlink.get_qos_select()
-+print "qos range is:",
-+print testlink.get_qos_range()
-+
-+#set some config value of testlink and read them again
-+print "setting current physiacal addr to aa:0:10:13:27:5"
-+testlink.set_physaddr('\xaa\0\x10\x13\x27\5')
-+physaddr = testlink.get_physaddr(dlpi.CURR_PHYS_ADDR)
-+print "current physical addr is: ",
-+print struct.unpack("BBBBBB",physaddr)
-+print "set timeout value to 6..."
-+testlink.set_timeout(6)
-+print "timeout value is %d" % testlink.get_timeout()
-+
-+#test enable/disable multicast
-+print "enable/disable multicast address 1:0:5e:0:0:5"
-+testlink.enabmulti('\1\0\x5e\0\0\5')
-+testlink.disabmulti('\1\0\x5e\0\0\5')
-+
-+#test bind
-+print "binding to SAP 0x9000..."
-+testlink.bind(0x9000)
-+print "sap is %x" % testlink.get_sap()
-+print "state is: %d"  % testlink.get_state()
-+
-+#test send
-+print "sending broadcast loopback packet..."
-+testlink.send(bcastaddr, '\0\1\2\3\4\5')
-+
-+#test notify functionality
-+arg = "notification callback arg"
-+def notify(arg, notes, value):
-+	print "NOTE_PROMISC_ON_PHYS notification received with arg: '%s'" % arg
-+print "enabled notification on NOTE_PROMISC_ON_PHYS"
-+id = testlink.enabnotify(dlpi.NOTE_PROMISC_ON_PHYS, notify, arg) #enable notification
-+testlink.promiscon() #trigger the event (will be seen while receiving pkt below)
-+
-+#test receive
-+print "testing receiving..."
-+try:
-+	testlink.recv(0, 0) #should see NOTE_PROMISC_ON_PHYS event here
-+except dlpi.error, err:
-+	errnum, errinfo = err
-+	if errnum == 10006:
-+		pass #timeout error is expected here
-+	else: #test fails if reach here
-+		print "test failed",
-+		print errnum,
-+		print err
-+
-+testlink.promiscoff()
-+testlink.disabnotify(id) #disable notification
-+
-+#test unbind
-+print "unbinding..."
-+testlink.unbind()
-+print "sap is %x" % testlink.get_sap()
-+print "state is: %d"  % testlink.get_state()
--- old/build/python26/patches/Python26-12-encoding-alias.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,35 +0,0 @@
-diff --git Python-2.6.4/Lib/encodings/aliases.py Python-2.6.4/Lib/encodings/aliases.py
---- Python-2.6.4/Lib/encodings/aliases.py
-+++ Python-2.6.4/Lib/encodings/aliases.py
-@@ -73,6 +73,7 @@
- 
-     # cp1251 codec
-     '1251'               : 'cp1251',
-+    'ansi_1251'          : 'cp1251',
-     'windows_1251'       : 'cp1251',
- 
-     # cp1252 codec
-@@ -217,6 +218,7 @@
-     'u_jis'              : 'euc_jp',
- 
-     # euc_kr codec
-+    '5601'               : 'euc_kr',
-     'euckr'              : 'euc_kr',
-     'korean'             : 'euc_kr',
-     'ksc5601'            : 'euc_kr',
-@@ -457,6 +459,7 @@
-     'shiftjis'           : 'shift_jis',
-     'sjis'               : 'shift_jis',
-     's_jis'              : 'shift_jis',
-+    'pck'                : 'shift_jis',
- 
-     # shift_jis_2004 codec
-     'shiftjis2004'       : 'shift_jis_2004',
-@@ -476,6 +479,7 @@
-     'tis_620_0'          : 'tis_620',
-     'tis_620_2529_0'     : 'tis_620',
-     'tis_620_2529_1'     : 'tis_620',
-+    'tis620.2533'        : 'tis_620',
-     'iso_ir_166'         : 'tis_620',
- 
-     # utf_16 codec
--- old/build/python26/patches/Python26-13-cflags.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,20 +0,0 @@
---- Python-2.6.4/configure.in.old	Fri Nov  4 12:03:26 2011
-+++ Python-2.6.4/configure.in	Fri Nov  4 12:04:05 2011
-@@ -919,7 +919,7 @@
- 	;;
- 
-     *)
--	OPT="-O"
-+	OPT=""
- 	;;
-     esac
- 
-@@ -1110,6 +1110,8 @@
- 	# environment?
-         Darwin*)
- 	    ;;
-+	SunOS*)
-+	    ;;
-         *)
- 	    BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
- 	    ;;
--- old/build/python26/patches/Python26-14-ctypes-util-find-library.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,39 +0,0 @@
-diff --git Python-2.6.4/Lib/ctypes/util.py Python-2.6.4/Lib/ctypes/util.py
---- Python-2.6.4/Lib/ctypes/util.py
-+++ Python-2.6.4/Lib/ctypes/util.py
-@@ -164,6 +164,35 @@
-             res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y)))
-             return res[-1]
- 
-+    elif sys.platform == "sunos5":
-+
-+        def _findLib_crle(name, is64):
-+            if not os.path.exists('/usr/bin/crle'):
-+                return None
-+
-+            if is64:
-+                cmd = 'env LC_ALL=C /usr/bin/crle -64 2>/dev/null'
-+            else:
-+                cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
-+
-+            for line in os.popen(cmd).readlines():
-+                line = line.strip()
-+                if (line.startswith('Default Library Path (ELF):')):
-+                    paths = line.split()[4]
-+
-+            if not paths:
-+                return None
-+
-+            for dir in paths.split(":"):
-+                libfile = os.path.join(dir, "lib%s.so" % name)
-+                if os.path.exists(libfile):
-+                    return libfile
-+
-+            return None
-+        
-+        def find_library(name, is64 = False):
-+            return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
-+
-     else:
- 
-         def _findLib_ldconfig(name):
--- old/build/python26/patches/Python26-15-getcwd.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,21 +0,0 @@
-diff -ruN Python-2.6.7-orig/Modules/posixmodule.c Python-2.6.7/Modules/posixmodule.c
---- Python-2.6.7-orig/Modules/posixmodule.c	2010-07-24 10:05:19.000000000 +0000
-+++ Python-2.6.7/Modules/posixmodule.c	2012-02-15 20:20:39.697617975 +0000
-@@ -1997,6 +1997,8 @@
-     char *res = NULL;
-     PyObject *dynamic_return;
- 
-+    int maxsize = pathconf(".", _PC_PATH_MAX);
-+
-     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)
--- old/build/python26/patches/Python26-16-privrbac.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,1581 +0,0 @@
-diff --git Python-2.6.4/Modules/authattr.c Python-2.6.4/Modules/authattr.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/authattr.c
-@@ -0,0 +1,262 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/*
-+ * RBAC Bindings for Python - auth_attr functions
-+ */
-+
-+#include <auth_attr.h>
-+#include "Python.h"
-+#include "pyrbac.h"
-+
-+static PyObject*
-+pyrbac_setauthattr(PyObject* self, PyObject* args) {
-+	setauthattr();
-+	return Py_None;
-+}
-+
-+static PyObject*
-+pyrbac_endauthattr(PyObject* self, PyObject* args) {
-+	endauthattr();
-+	return Py_None;
-+}
-+
-+PyObject*
-+pyrbac_getauthnamattr(PyObject* self, char* authname, int mode) {
-+	
-+
-+	
-+	authattr_t * ret_authattr = (mode == PYRBAC_NAM_MODE) ? getauthnam(authname) : getauthattr();
-+	if (ret_authattr == NULL)
-+		return Py_None;
-+		
-+	PyObject* kv_data = PyDict_New();
-+	if (kv_data == NULL) {
-+		free_authattr(ret_authattr);
-+		return NULL;
-+	}
-+
-+	if(ret_authattr->attr != NULL) {
-+		int len;
-+		for(len = 0; len < ret_authattr->attr->length; len++) {
-+			kv_t current = ret_authattr->attr->data[len];
-+
-+			PyObject* set = PyList_New(NULL);
-+			char* saveptr;
-+			char* item = strtok_r(current.value, ",", &saveptr);
-+			PyList_Append(set, PyString_FromString(item));
-+
-+			while((item = strtok_r(NULL, ",", &saveptr)) != NULL) {
-+				if(PyList_Append(set, PyString_FromString(item)) != 0) {
-+					Py_XDECREF(set);
-+					Py_XDECREF(kv_data);
-+					free_authattr(ret_authattr);
-+					return NULL;
-+				}
-+			}
-+			if(PyDict_SetItemString(kv_data, current.key, set)) {
-+					free_authattr(ret_authattr);
-+					return NULL;
-+			}
-+		}
-+	}
-+	PyObject * retval = Py_BuildValue("{s:s,s:s,s:s,s:s,s:s,s:O}",
-+		"name",ret_authattr->name,
-+		"res1",ret_authattr->res1,
-+		"res2",ret_authattr->res2,
-+		"short",ret_authattr->short_desc,
-+		"long",ret_authattr->long_desc,
-+		"attributes",kv_data);
-+
-+	free_authattr(ret_authattr);
-+	return retval;
-+
-+}
-+
-+static PyObject*
-+pyrbac_getauthattr(PyObject* self, PyObject* args) {
-+	return(pyrbac_getauthnamattr(self, NULL, PYRBAC_ATTR_MODE));
-+}
-+
-+static PyObject*
-+pyrbac_getauthnam(PyObject* self, PyObject* args) {
-+	char* name = NULL;
-+	if(!PyArg_ParseTuple(args, "s:getauthnam", &name))
-+		return NULL;
-+	return(pyrbac_getauthnamattr(self, name, PYRBAC_NAM_MODE));
-+}
-+
-+static PyObject *
-+pyrbac_chkauthattr(PyObject* self, PyObject* args) {
-+	char* authstring = NULL;
-+	char* username = NULL;
-+	if(!PyArg_ParseTuple(args, "ss:chkauthattr", &authstring, &username))
-+		return NULL;
-+	return PyBool_FromLong((long)chkauthattr(authstring, username));
-+}
-+
-+static PyObject*
-+pyrbac_authattr_next(PyObject* self, PyObject* args) {
-+	PyObject* retval = pyrbac_getauthattr(self, args);
-+	if( retval == Py_None ) {
-+		setauthattr();
-+		return NULL;
-+	}
-+	return retval;
-+}
-+static PyObject*
-+pyrbac_authattr__iter__(PyObject* self, PyObject* args) {
-+	return self;
-+}
-+
-+typedef struct {
-+	PyObject_HEAD
-+} Authattr;
-+
-+static void
-+Authattr_dealloc(Authattr* self) {
-+	endauthattr();
-+	self->ob_type->tp_free((PyObject*) self);
-+}
-+
-+static PyObject*
-+Authattr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
-+	Authattr *self;
-+	self = (Authattr*)type->tp_alloc(type, 0);
-+
-+	return ((PyObject *) self);
-+}
-+
-+static int
-+Authattr_init(Authattr* self, PyObject *args, PyObject *kwargs) {
-+	setauthattr();
-+	return 0;
-+}
-+
-+static char pyrbac_authattr__doc__[];
-+
-+PyDoc_STRVAR(pyrbac_authattr__doc__, """provides interfaces to the auth_attr \
-+database. may be iterated over to return all auth_attr entries\n\n\
-+Methods provided:\n\
-+setauthattr\n\
-+endauthattr\n\
-+getauthattr\n\
-+chkauthattr\n\
-+getauthnam""");
-+
-+static char pyrbac_setauthattr__doc__[];
-+static char pyrbac_endauthattr__doc__[];
-+static char pyrbac_getauthattr__doc__[];
-+static char pyrbac_chkauthattr__doc__[];
-+
-+PyDoc_STRVAR(pyrbac_setauthattr__doc__, 
-+"\"rewinds\" the auth_attr functions to the first entry in the db. Called \
-+automatically by the constructor\n\tArguments: None\n\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_endauthattr__doc__, 
-+"closes the auth_attr database, cleans up storage. called automatically by \
-+the destructor\n\tArguments: None\n\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_chkauthattr__doc__, "verifies if a user has a given \
-+authorization.\n\tArguments: 2 Python strings, 'authname' and 'username'\n\
-+\tReturns: True if the user is authorized, False otherwise");
-+
-+PyDoc_STRVAR(pyrbac_getauthattr__doc__, 
-+"return one entry from the auth_attr database\n\
-+\tArguments: None\n\
-+\tReturns: a dict representing the authattr_t struct:\n\
-+\t\t\"name\": Authorization Name\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"short\": Short Description\n\
-+\t\t\"long\": Long Description\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value");
-+
-+PyDoc_STRVAR(pyrbac_getauthnam__doc__, 
-+"searches the auth_attr database for a given authorization name\n\
-+\tArguments: a Python string containing the auth name\n\
-+\tReturns: a dict representing the authattr_t struct:\n\
-+\t\t\"name\": Authorization Name\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"short\": Short Description\n\
-+\t\t\"long\": Long Description\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value");
-+
-+static PyMethodDef Authattr_methods[] = {
-+	{"setauthattr", pyrbac_setauthattr, METH_NOARGS, pyrbac_setauthattr__doc__},
-+	{"endauthattr", pyrbac_endauthattr, METH_NOARGS, pyrbac_endauthattr__doc__},
-+	{"chkauthattr", pyrbac_chkauthattr, METH_VARARGS, pyrbac_chkauthattr__doc__},
-+	{"getauthattr", pyrbac_getauthattr, METH_NOARGS, pyrbac_getauthattr__doc__},
-+	{"getauthnam", pyrbac_getauthnam, METH_VARARGS, pyrbac_getauthnam__doc__},
-+	{NULL}
-+};
-+
-+PyTypeObject AuthattrType = {
-+	PyObject_HEAD_INIT(NULL)
-+	0,                         /*ob_size*/
-+	"rbac.authattr",             /*tp_name*/
-+	sizeof(Authattr),             /*tp_basicsize*/
-+	0,                         /*tp_itemsize*/
-+	(destructor)Authattr_dealloc, /*tp_dealloc*/
-+	0,                         /*tp_print*/
-+	0,                         /*tp_getattr*/
-+	0,                         /*tp_setattr*/
-+	0,                         /*tp_compare*/
-+	0,                         /*tp_repr*/
-+	0,                         /*tp_as_number*/
-+	0,                         /*tp_as_sequence*/
-+	0,                         /*tp_as_mapping*/
-+	0,                         /*tp_hash */
-+	0,                         /*tp_call*/
-+	0,                         /*tp_str*/
-+	0,                         /*tp_getattro*/
-+	0,                         /*tp_setattro*/
-+	0,                         /*tp_as_buffer*/
-+	Py_TPFLAGS_DEFAULT |
-+	Py_TPFLAGS_BASETYPE |
-+	Py_TPFLAGS_HAVE_ITER, /*tp_flags*/
-+	pyrbac_authattr__doc__,           /* tp_doc */
-+	0,		               /* tp_traverse */
-+	0,		               /* tp_clear */
-+	0,		               /* tp_richcompare */
-+	0,		               /* tp_weaklistoffset */
-+	pyrbac_authattr__iter__,		               /* tp_iter */
-+	pyrbac_authattr_next,         /* tp_iternext */
-+	Authattr_methods,             /* tp_methods */
-+	0,             /* tp_members */
-+	0,                         /* tp_getset */
-+	0,                         /* tp_base */
-+	0,                         /* tp_dict */
-+	0,                         /* tp_descr_get */
-+	0,                         /* tp_descr_set */
-+	0,                         /* tp_dictoffset */
-+	(initproc)Authattr_init,      /* tp_init */
-+	0,                         /* tp_alloc */
-+	Authattr_new,                 /* tp_new */
-+};
-diff --git Python-2.6.4/Modules/execattr.c Python-2.6.4/Modules/execattr.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/execattr.c
-@@ -0,0 +1,314 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/*
-+ * RBAC Bindings for Python - exec_attr functions
-+ */
-+
-+#include <exec_attr.h>
-+#include "Python.h"
-+#include "pyrbac.h"
-+
-+static PyObject *
-+pyrbac_setexecattr(PyObject* self, PyObject* args) {
-+	setexecattr();
-+	return Py_None;
-+}
-+
-+static PyObject *
-+pyrbac_endexecattr(PyObject* self, PyObject* args) {
-+	endexecattr();
-+	return Py_None;
-+}
-+
-+PyObject *
-+pyrbac_getexecuserprofattr(PyObject* self, char* userprofname, char* type, char* id, int mode) {
-+
-+	PyObject* ep_data = (mode == PYRBAC_ATTR_MODE) ? NULL : PyList_New(0);
-+	
-+	if (ep_data == NULL && mode != PYRBAC_ATTR_MODE )
-+		return NULL;
-+	
-+	execattr_t *execprof;
-+	if (mode == PYRBAC_USER_MODE)
-+		execprof = getexecuser(userprofname, type, id, GET_ALL);
-+	else if (mode == PYRBAC_PROF_MODE)
-+		execprof = getexecprof(userprofname, type, id, GET_ALL);
-+	else if (mode == PYRBAC_ATTR_MODE)
-+		execprof = getexecattr();
-+	else
-+		return NULL;
-+
-+	if (execprof == NULL)
-+		return Py_None;
-+	
-+	execattr_t *execprof_head = execprof;
-+
-+	while(execprof != NULL) {
-+		
-+		PyObject* kv_data = PyDict_New();
-+
-+		if(execprof->attr != NULL) {
-+			int len;
-+			for(len = 0; len < execprof->attr->length; len++) {
-+				kv_t current = execprof->attr->data[len];
-+
-+				PyObject* set = PyList_New(NULL);
-+				char* saveptr;
-+				char* item = strtok_r(current.value, ",", &saveptr);
-+				PyList_Append(set, PyString_FromString(item));
-+
-+				while((item = strtok_r(NULL, ",", &saveptr)) != NULL) {
-+					if(PyList_Append(set, PyString_FromString(item)) != 0) {
-+						Py_XDECREF(set);
-+						Py_XDECREF(kv_data);
-+						free_execattr(execprof_head);
-+						return NULL;
-+					}
-+				}
-+				if(PyDict_SetItemString(kv_data, current.key, set)) {
-+						free_execattr(execprof_head);
-+						return NULL;
-+				}
-+			}
-+		}
-+		PyObject* entry = Py_BuildValue("{s:s,s:s,s:s,s:s,s:s,s:s,s:O}",
-+			"name", execprof->name,
-+			"type", execprof->type,
-+			"policy", execprof->policy,
-+			"res1", execprof->res1,
-+			"res2", execprof->res2,
-+			"id", execprof->id,
-+			"attributes", kv_data);
-+		
-+		if (entry == NULL) {
-+			Py_XDECREF(kv_data);
-+			free_execattr(execprof_head);
-+			return NULL;
-+		}
-+		
-+		if (mode == PYRBAC_ATTR_MODE) {
-+			free_execattr(execprof_head);
-+			return(entry);
-+		}
-+		PyList_Append(ep_data, entry);
-+		execprof = execprof->next;
-+	}
-+
-+	free_execattr(execprof_head);
-+	return(ep_data);
-+ 
-+}
-+
-+static PyObject *
-+pyrbac_getexecuser(PyObject* self, PyObject* args) {
-+	char* username = NULL;
-+	char* type = NULL;
-+	char* id = NULL;
-+	
-+	if(!PyArg_ParseTuple(args, "sss:getexecuser", &username, &type, &id))
-+		return NULL;
-+
-+	return (pyrbac_getexecuserprofattr(self, username, type, id, PYRBAC_USER_MODE));
-+}
-+
-+static PyObject *
-+pyrbac_getexecprof(PyObject* self, PyObject* args) {
-+
-+	char* profname = NULL;
-+	char* type = NULL;
-+	char* id = NULL;
-+	
-+	if(!PyArg_ParseTuple(args, "sss:getexecprof", &profname, &type, &id))
-+		return NULL;
-+
-+	return (pyrbac_getexecuserprofattr(self, profname, type, id, PYRBAC_PROF_MODE));
-+}
-+
-+static PyObject*
-+pyrbac_getexecattr(PyObject* self, PyObject* args) {
-+	return pyrbac_getexecuserprofattr(self, NULL, NULL, NULL, PYRBAC_ATTR_MODE);
-+}
-+
-+static PyObject*
-+pyrbac_execattr_next(PyObject* self, PyObject* args) {
-+	PyObject* retval = pyrbac_getexecattr(self, args);
-+	if( retval == Py_None ) {
-+		setexecattr();
-+		return NULL;
-+	}
-+	return retval;
-+}
-+static PyObject*
-+pyrbac_execattr__iter__(PyObject* self, PyObject* args) {
-+	return self;
-+}
-+
-+typedef struct {
-+	PyObject_HEAD
-+} Execattr;
-+
-+static void
-+Execattr_dealloc(Execattr* self) {
-+	endexecattr();
-+	self->ob_type->tp_free((PyObject*) self);
-+}
-+
-+static PyObject*
-+Execattr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
-+	Execattr *self;
-+	self = (Execattr*)type->tp_alloc(type, 0);
-+
-+	return ((PyObject *) self);
-+}
-+
-+static int
-+Execattr_init(Execattr* self, PyObject *args, PyObject *kwargs) {
-+	setexecattr();
-+	return 0;
-+}
-+
-+static char pyrbac_execattr__doc__[];
-+
-+PyDoc_STRVAR(pyrbac_execattr__doc__, "provides functions for \
-+interacting with the execution profiles database. May be iterated over to \
-+enumerate exec_attr(4) entries\n\n\
-+Methods provided:\n\
-+setexecattr\n\
-+endexecattr\n\
-+getexecattr\n\
-+getexecprof\n\
-+getexecuser");
-+
-+
-+static char pyrbac_getexecuser__doc__[];
-+static char pyrbac_getexecprof__doc__[];
-+static char pyrbac_getexecattr__doc__[];
-+static char pyrbac_setexecattr__doc__[];
-+static char pyrbac_endexecattr__doc__[];
-+
-+PyDoc_STRVAR(pyrbac_setexecattr__doc__,
-+"\"rewinds\" the exec_attr functions to the first entry in the db. Called \
-+automatically by the constructor.\n\
-+\tArguments: None\
-+\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_endexecattr__doc__, 
-+"closes the exec_attr database, cleans up storage. called automatically by \
-+the destructor.\n\
-+\tArguments: None\
-+\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_getexecuser__doc__, "corresponds with getexecuser(3SECDB)\
-+\nTakes: \'username\', \'type\', \'id\'\n\
-+Return: a single exec_attr entry\n\
-+\tArguments: None\n\
-+\tReturns: a dict representation of an execattr_t struct:\n\
-+\t\t\"name\": Authorization Name\n\
-+\t\t\"type\": Profile Type\n\
-+\t\t\"policy\": Policy attributes are relevant in\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"id\": unique identifier\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as\
-+either a list or a string depending on value");
-+
-+PyDoc_STRVAR(pyrbac_getexecprof__doc__, "corresponds with getexecprof(3SECDB)\
-+\nTakes: \'profile name\', \'type\', \'id\'\n\
-+\tReturns: a dict representation of an execattr_t struct:\n\
-+\t\t\"name\": Authorization Name\n\
-+\t\t\"type\": Profile Type\n\
-+\t\t\"policy\": Policy attributes are relevant in\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"id\": unique identifier\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as\
-+either a list or a string depending on value");
-+
-+PyDoc_STRVAR(pyrbac_getexecattr__doc__, "corresponds with getexecattr(3SECDB)\
-+\nTakes 0 arguments\n\
-+\tReturns: a dict representation of an execattr_t struct:\n\
-+\t\t\"name\": Authorization Name\n\
-+\t\t\"type\": Profile Type\n\
-+\t\t\"policy\": Policy attributes are relevant in\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"id\": unique identifier\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as\
-+either a list or a string depending on value");
-+
-+static PyMethodDef Execattr_methods[] = {
-+	{"setexecattr", pyrbac_setexecattr, METH_NOARGS, pyrbac_setexecattr__doc__},
-+	{"endexecattr", pyrbac_endexecattr, METH_NOARGS, pyrbac_endexecattr__doc__},
-+	{"getexecprof", pyrbac_getexecprof, METH_VARARGS, pyrbac_getexecprof__doc__},	
-+	{"getexecuser", pyrbac_getexecuser, METH_VARARGS, pyrbac_getexecuser__doc__},
-+	{"getexecattr", pyrbac_getexecattr, METH_NOARGS, pyrbac_getexecattr__doc__},
-+	{NULL}
-+};
-+
-+PyTypeObject ExecattrType = {
-+	PyObject_HEAD_INIT(NULL)
-+	0,                         /*ob_size*/
-+	"rbac.execattr",             /*tp_name*/
-+	sizeof(Execattr),             /*tp_basicsize*/
-+	0,                         /*tp_itemsize*/
-+	(destructor)Execattr_dealloc, /*tp_dealloc*/
-+	0,                         /*tp_print*/
-+	0,                         /*tp_getattr*/
-+	0,                         /*tp_setattr*/
-+	0,                         /*tp_compare*/
-+	0,                         /*tp_repr*/
-+	0,                         /*tp_as_number*/
-+	0,                         /*tp_as_sequence*/
-+	0,                         /*tp_as_mapping*/
-+	0,                         /*tp_hash */
-+	0,                         /*tp_call*/
-+	0,                         /*tp_str*/
-+	0,                         /*tp_getattro*/
-+	0,                         /*tp_setattro*/
-+	0,                         /*tp_as_buffer*/
-+	Py_TPFLAGS_DEFAULT |
-+	Py_TPFLAGS_BASETYPE |
-+	Py_TPFLAGS_HAVE_ITER, /*tp_flags*/
-+	pyrbac_execattr__doc__,           /* tp_doc */
-+	0,		               /* tp_traverse */
-+	0,		               /* tp_clear */
-+	0,		               /* tp_richcompare */
-+	0,		               /* tp_weaklistoffset */
-+	pyrbac_execattr__iter__,		               /* tp_iter */
-+	pyrbac_execattr_next,         /* tp_iternext */
-+	Execattr_methods,             /* tp_methods */
-+	0,             /* tp_members */
-+	0,                         /* tp_getset */
-+	0,                         /* tp_base */
-+	0,                         /* tp_dict */
-+	0,                         /* tp_descr_get */
-+	0,                         /* tp_descr_set */
-+	0,                         /* tp_dictoffset */
-+	(initproc)Execattr_init,      /* tp_init */
-+	0,                         /* tp_alloc */
-+	Execattr_new,                 /* tp_new */
-+};
-diff --git Python-2.6.4/Modules/privileges.c Python-2.6.4/Modules/privileges.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/privileges.c
-@@ -0,0 +1,230 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/*
-+ * privileges(5) bindings for Python
-+ */
-+
-+#include <priv.h>
-+#include "Python.h"
-+
-+static PyObject *
-+pyprivileges_setppriv( PyObject *self, PyObject *args) {
-+	priv_op_t op = -1 ; 
-+	priv_ptype_t which = NULL;
-+
-+	PyObject* set_list = NULL;
-+
-+	priv_set_t * set = NULL;
-+
-+	if(!PyArg_ParseTuple(args, "iiO:setppriv", &op, &which, &set_list))
-+		return NULL;
-+	
-+	if((op != PRIV_ON && op != PRIV_OFF && op != PRIV_SET) ||
-+		(which != PRIV_PERMITTED && which != PRIV_EFFECTIVE &&
-+		which != PRIV_INHERITABLE && which != PRIV_LIMIT))
-+		return NULL;
-+	
-+	PyObject* set_string = PyList_GetItem(set_list, 0);
-+	int i;
-+	for (i = 1; i < PyList_Size(set_list); ++i) {
-+		PyString_Concat(&set_string, PyString_FromString(","));
-+		PyString_Concat(&set_string, PyList_GetItem(set_list, i));
-+	}
-+
-+	set = priv_str_to_set(PyString_AsString(set_string), ",", NULL );
-+
-+	if ( set == NULL )
-+		return NULL;
-+
-+	long ret = (long) setppriv(op, which, set);
-+	priv_freeset(set);	
-+	// Python inverts true & false
-+	if(ret)
-+		Py_RETURN_FALSE;
-+	
-+	Py_RETURN_TRUE;
-+}
-+
-+static PyObject *
-+pyprivileges_getppriv( PyObject *self, PyObject *args) {
-+
-+	char* set_str = NULL;
-+	priv_ptype_t which = NULL;
-+	priv_set_t * set = priv_allocset();
-+	if (set == NULL)
-+		return NULL;
-+
-+	if(!PyArg_ParseTuple(args, "i:getppriv", &which))
-+		return NULL;
-+
-+	if (which != PRIV_PERMITTED && which != PRIV_EFFECTIVE &&
-+	which != PRIV_INHERITABLE && which != PRIV_LIMIT)
-+		return NULL;
-+
-+	if (getppriv(which, set) != 0)
-+		return NULL;
-+	
-+	set_str = priv_set_to_str(set, ',', PRIV_STR_LIT);
-+	priv_freeset(set);
-+	
-+	PyObject* set_list = PyList_New(NULL);
-+	char* saveptr;
-+	char* item = strtok_r(set_str, ",", &saveptr);
-+	PyList_Append(set_list, PyString_FromString(item));
-+
-+	while((item = strtok_r(NULL, ",", &saveptr)) != NULL) {
-+		if(PyList_Append(set_list, PyString_FromString(item)) != 0) {
-+			Py_XDECREF(set_list);
-+			return NULL;
-+		}
-+	}
-+
-+	return(set_list);
-+}
-+
-+static PyObject *
-+pyprivileges_priv_inverse( PyObject *self, PyObject *args ) {
-+
-+	PyObject* set_list_in = NULL;
-+	if(!PyArg_ParseTuple(args, "O:priv_inverse", &set_list_in))
-+		return NULL;
-+
-+	PyObject* set_string = PyList_GetItem(set_list_in, 0);
-+	int i;
-+	for (i = 1; i < PyList_Size(set_list_in); ++i) {
-+		PyString_Concat(set_string, PyString_FromString(","));
-+		PyString_Concat(set_string, PyList_GetItem(set_list_in, i));
-+	}
-+
-+	priv_set_t * set = priv_str_to_set(PyString_AsString(set_string), ",", NULL);
-+	if (set == NULL)
-+		return NULL;
-+	priv_inverse(set);
-+	char * ret_str = priv_set_to_str(set, ',', PRIV_STR_LIT);
-+	priv_freeset(set);
-+	
-+	PyObject* set_list_out = PyList_New(NULL);
-+	char* saveptr;
-+	char* item = strtok_r(ret_str, ",", &saveptr);
-+	PyList_Append(set_list_out, PyString_FromString(item));
-+
-+	while((item = strtok_r(NULL, ",", &saveptr)) != NULL) {
-+		if(PyList_Append(set_list_out, PyString_FromString(item)) != 0) {
-+			Py_XDECREF(set_list_out);
-+			return NULL;
-+		}
-+	}
-+	
-+	Py_XDECREF(set_list_in);
-+	
-+	return(set_list_out);
-+}
-+
-+/* priv_ineffect is a convienient wrapper to priv_get
-+ * however priv_set is, in the context of python, not
-+ * much of a convienience, so it's omitted
-+ */
-+static PyObject * 
-+pyprivileges_priv_ineffect(PyObject* self, PyObject* args) {
-+	char* privstring=NULL;
-+	if (!PyArg_ParseTuple(args, "s:priv_ineffect", &privstring))
-+		return NULL;
-+	return PyBool_FromLong(priv_ineffect(privstring));
-+}
-+
-+
-+static char pyprivileges__doc__[];
-+PyDoc_STRVAR(pyprivileges__doc__, 
-+"Provides functions for interacting with the Solaris privileges(5) framework\n\
-+Functions provided:\n\
-+setppriv\n\
-+getppriv\n\
-+priv_ineffect\n\
-+priv_inverse");
-+
-+static char pyprivileges_setppriv__doc__[];
-+static char pyprivileges_getppriv__doc__[];
-+static char pyprivileges_priv_ineffect__doc__[];
-+static char pyprivileges_priv_inverse__doc__[];
-+
-+PyDoc_STRVAR(pyprivileges_setppriv__doc__, 
-+"Facilitates setting the permitted/inheritable/limit/effective privileges set\n\
-+\tArguments:\n\
-+\t\tone of (PRIV_ON|PRIV_OFF|PRIV_SET)\n\
-+\t\tone of (PRIV_PERMITTED|PRIV_INHERITABLE|PRIV_LIMIT|PRIV_EFFECTIVE)\n\
-+\t\tset of privileges: a list of strings\n\
-+\tReturns: True on success, False on failure\
-+");
-+
-+PyDoc_STRVAR(pyprivileges_getppriv__doc__, 
-+"Return the process privilege set\n\
-+\tArguments:\n\
-+\t\tone of (PRIV_PERMITTED|PRIV_INHERITABLE|PRIV_LIMIT|PRIV_EFFECTIVE)\n\
-+\tReturns: a Python list of strings");
-+	
-+PyDoc_STRVAR(pyprivileges_priv_ineffect__doc__, 
-+"Checks for a privileges presence in the effective set\n\
-+\tArguments: a String\n\
-+\tReturns: True if the privilege is in effect, False otherwise");
-+
-+PyDoc_STRVAR(pyprivileges_priv_inverse__doc__, 
-+"The complement of the set of privileges\n\
-+\tArguments: a list of strings\n\tReturns: a list of strings");
-+
-+static PyMethodDef module_methods[] = {
-+	{"setppriv", pyprivileges_setppriv, METH_VARARGS, pyprivileges_setppriv__doc__}, 
-+	{"getppriv", pyprivileges_getppriv, METH_VARARGS, pyprivileges_getppriv__doc__}, 
-+	{"priv_ineffect", pyprivileges_priv_ineffect, METH_VARARGS, pyprivileges_priv_ineffect__doc__},
-+	{"priv_inverse", pyprivileges_priv_inverse, METH_VARARGS, pyprivileges_priv_inverse__doc__},
-+	{NULL}
-+};
-+
-+
-+#ifndef PyMODINIT_FUNC	/* declarations for DLL import/export */
-+#define PyMODINIT_FUNC void
-+#endif
-+PyMODINIT_FUNC
-+initprivileges(void) {
-+	PyObject* m;
-+
-+	m = Py_InitModule3("privileges", module_methods, pyprivileges__doc__);
-+		if ( m == NULL )
-+		return;
-+		
-+	PyObject* d = PyModule_GetDict(m);
-+	if (d == NULL)
-+		return;
-+
-+	PyDict_SetItemString(d, "PRIV_ON", PyInt_FromLong((long)PRIV_ON));
-+	PyDict_SetItemString(d, "PRIV_OFF", PyInt_FromLong((long)PRIV_OFF));
-+	PyDict_SetItemString(d, "PRIV_SET", PyInt_FromLong((long)PRIV_SET));
-+
-+	PyDict_SetItemString(d, "PRIV_PERMITTED", PyInt_FromLong((long)PRIV_PERMITTED));
-+	PyDict_SetItemString(d, "PRIV_INHERITABLE", PyInt_FromLong((long)PRIV_INHERITABLE));
-+	PyDict_SetItemString(d, "PRIV_LIMIT", PyInt_FromLong((long)PRIV_LIMIT));
-+	PyDict_SetItemString(d, "PRIV_EFFECTIVE", PyInt_FromLong((long)PRIV_EFFECTIVE));
-+}
-diff --git Python-2.6.4/Modules/pyrbac.c Python-2.6.4/Modules/pyrbac.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/pyrbac.c
-@@ -0,0 +1,69 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/*
-+ * RBAC Bindings for Python
-+ */
-+
-+#include <Python.h>
-+#include "pyrbac.h"
-+
-+static PyMethodDef module_methods[] = {NULL};
-+static char pyrbac__doc__[];
-+
-+PyDoc_STRVAR(pyrbac__doc__, "provides access to some objects \
-+for interaction with the Solaris Role-Based Access Control \
-+framework.\n\nDynamic objects:\n\
-+userattr -- for interacting with user_attr(4)\n\
-+authattr -- for interacting with auth_attr(4)\n\
-+execattr -- for interacting with exec_attr(4)\n");
-+
-+#ifndef PyMODINIT_FUNC	/* declarations for DLL import/export */
-+#define PyMODINIT_FUNC void
-+#endif
-+PyMODINIT_FUNC
-+initrbac(void) {
-+	PyObject* m;
-+	if (PyType_Ready(&AuthattrType) < 0 || 
-+		PyType_Ready(&ExecattrType) < 0 ||
-+		PyType_Ready(&UserattrType) < 0 )
-+		return;
-+
-+	m = Py_InitModule3("rbac", module_methods, pyrbac__doc__);
-+	if ( m == NULL )
-+		return;
-+	
-+	Py_INCREF(&AuthattrType);
-+	PyModule_AddObject(m, "authattr", (PyObject*)&AuthattrType);
-+
-+	Py_INCREF(&ExecattrType);
-+	PyModule_AddObject(m, "execattr", (PyObject*)&ExecattrType);
-+
-+	Py_INCREF(&UserattrType);
-+	PyModule_AddObject(m, "userattr", (PyObject*)&UserattrType);
-+
-+}
-+
-diff --git Python-2.6.4/Modules/pyrbac.h Python-2.6.4/Modules/pyrbac.h
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/pyrbac.h
-@@ -0,0 +1,46 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/* 
-+ * RBAC bindings for python
-+ */
-+#ifndef PYRBAC_H
-+#define PYRBAC_H
-+
-+#include <secdb.h>
-+
-+
-+#define PYRBAC_USER_MODE 1
-+#define PYRBAC_PROF_MODE 2
-+#define PYRBAC_ATTR_MODE 3
-+#define PYRBAC_NAM_MODE 4
-+#define PYRBAC_UID_MODE 5
-+
-+PyTypeObject AuthattrType;
-+PyTypeObject ExecattrType;
-+PyTypeObject UserattrType;
-+
-+#endif
-diff --git Python-2.6.4/Modules/userattr.c Python-2.6.4/Modules/userattr.c
-new file mode 100644
---- /dev/null
-+++ Python-2.6.4/Modules/userattr.c
-@@ -0,0 +1,309 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+/*
-+ * RBAC Bindings for Python - user_attr functions
-+ */
-+
-+#include <stdio.h>
-+#include <user_attr.h>
-+#include "Python.h"
-+#include "pyrbac.h"
-+
-+static PyObject*
-+pyrbac_setuserattr(PyObject* self, PyObject* args) {
-+	setuserattr();
-+	return Py_None;
-+}
-+
-+static PyObject*
-+pyrbac_enduserattr(PyObject* self, PyObject* args) {
-+	enduserattr();
-+	return Py_None;
-+}
-+
-+PyObject*
-+pyrbac_getuseruidnamattr(PyObject* self, void* arg, int mode, char* filename) {
-+	
-+	userattr_t *ret_userattr;
-+
-+	if (mode == PYRBAC_ATTR_MODE) {
-+	    if (filename != NULL) {
-+            FILE* file = fopen(filename, "r");
-+            if (file == NULL)
-+                return NULL;
-+	        ret_userattr = fgetuserattr(file);
-+	        if (fclose(file))
-+                return NULL;
-+	    }
-+	    else
-+	    	ret_userattr = getuserattr();
-+	}
-+	else if (mode == PYRBAC_NAM_MODE)
-+		ret_userattr = getusernam((char*) arg);
-+	else if (mode == PYRBAC_UID_MODE)
-+		ret_userattr = getuseruid(*((uid_t*) arg));
-+	
-+	if (ret_userattr == NULL)
-+		return Py_None;
-+	
-+	PyObject* entry = PyTuple_New(5);
-+	if (entry == NULL) {
-+		free_userattr(ret_userattr);
-+		return NULL;
-+	}
-+	
-+	PyObject* kv_data = PyDict_New();
-+
-+	if(ret_userattr->attr != NULL) {
-+		int len;
-+		for(len = 0; len < ret_userattr->attr->length; len++) {
-+			kv_t current = ret_userattr->attr->data[len];
-+
-+			PyObject* set = PyList_New(NULL);
-+			char* saveptr;
-+			char* item = strtok_r(current.value, ",", &saveptr);
-+			PyList_Append(set, PyString_FromString(item));
-+
-+			while((item = strtok_r(NULL, ",", &saveptr)) != NULL) {
-+				if(PyList_Append(set, PyString_FromString(item)) != 0) {
-+					Py_XDECREF(set);
-+					Py_XDECREF(kv_data);
-+					free_userattr(ret_userattr);
-+					return NULL;
-+				}
-+			}
-+			if(PyDict_SetItemString(kv_data, current.key, set)) {
-+					free_userattr(ret_userattr);
-+					return NULL;
-+			}
-+		}
-+	}
-+	entry = Py_BuildValue("{s:s,s:s,s:s,s:s,s:O}", 
-+		"name", ret_userattr->name,
-+		"qualifier", ret_userattr->qualifier,
-+		"res1", ret_userattr->res1,
-+		"res2", ret_userattr->res2,
-+		"attributes", kv_data);
-+
-+	free_userattr(ret_userattr);
-+	
-+	return entry;
-+}
-+
-+
-+static PyObject*
-+pyrbac_getuserattr(PyObject* self, PyObject* args) {
-+	return(pyrbac_getuseruidnamattr(self, (void*) NULL, PYRBAC_ATTR_MODE, NULL));
-+}
-+
-+static PyObject*
-+pyrbac_fgetuserattr(PyObject* self, PyObject* args) {
-+	char* filename = NULL;
-+	if(!PyArg_ParseTuple(args, "s:fgetuserattr", &filename))
-+		return NULL;
-+	return(pyrbac_getuseruidnamattr(self, NULL, PYRBAC_ATTR_MODE, filename));
-+}
-+
-+static PyObject*
-+pyrbac_getusernam(PyObject* self, PyObject* args) {
-+	char* name = NULL;
-+	if(!PyArg_ParseTuple(args, "s:getusernam", &name))
-+		return NULL;
-+	return(pyrbac_getuseruidnamattr(self, (void*) name, PYRBAC_NAM_MODE, NULL));
-+}
-+
-+static PyObject*
-+pyrbac_getuseruid(PyObject* self, PyObject* args) {
-+	uid_t uid;
-+	if(!PyArg_ParseTuple(args, "i:getuseruid", &uid))
-+		return NULL;
-+	return(pyrbac_getuseruidnamattr(self, (void*) &uid, PYRBAC_UID_MODE, NULL));
-+}
-+
-+static PyObject*
-+pyrbac_userattr_next(PyObject* self, PyObject* args) {
-+	PyObject* retval = pyrbac_getuserattr(self, args);
-+	if( retval == Py_None ) {
-+		setuserattr();
-+		return NULL;
-+	}
-+	return retval;
-+}
-+static PyObject*
-+pyrbac_userattr__iter__(PyObject* self, PyObject* args) {
-+	return self;
-+}
-+
-+typedef struct {
-+	PyObject_HEAD
-+} Userattr;
-+
-+static void
-+Userattr_dealloc(Userattr* self) {
-+	enduserattr();
-+	self->ob_type->tp_free((PyObject*) self);
-+}
-+
-+static PyObject*
-+Userattr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
-+	Userattr *self;
-+	self = (Userattr*)type->tp_alloc(type, 0);
-+
-+	return ((PyObject *) self);
-+}
-+
-+static int
-+Userattr_init(Userattr* self, PyObject *args, PyObject *kwargs) {
-+	setuserattr();
-+	return 0;
-+}
-+
-+static char pyrbac_userattr__doc__[];
-+PyDoc_STRVAR(pyrbac_userattr__doc__, "provides functions for \
-+interacting with the extended user attributes database. May be iterated over \
-+to enumerate user_attr(4) entries\n\n\
-+Methods provided:\n\
-+setuserattr\n\
-+enduserattr\n\
-+getuserattr\n\
-+fgetuserattr\n\
-+getusernam\n\
-+getuseruid");
-+
-+static char pyrbac_setuserattr__doc__[];
-+static char pyrbac_enduserattr__doc__[];
-+static char pyrbac_getuserattr__doc__[];
-+static char pyrbac_getusernam__doc__[];
-+static char pyrbac_getuseruid__doc__[];
-+
-+PyDoc_STRVAR(pyrbac_setuserattr__doc__, "\"rewinds\" the user_attr functions \
-+to the first entry in the db. Called automatically by the constructor.\n\
-+\tArguments: None\n\
-+\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_enduserattr__doc__, "closes the user_attr database, \
-+cleans up storage. called automatically by the destructor\n\
-+\tArguments: None\n\
-+\tReturns: None");
-+
-+PyDoc_STRVAR(pyrbac_getuserattr__doc__, "Return a single user_attr entry\n \
-+\tArguments: None\n\
-+\tReturns: a dict representation of a userattr_t struct:\n\
-+\t\t\"name\": username\n\
-+\t\t\"qualifier\": reserved\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value"
-+);
-+
-+PyDoc_STRVAR(pyrbac_fgetuserattr__doc__, "Return a single user_attr entry \
-+from a file, bypassing nsswitch.conf\n\
-+\tArguments: \'filename\'\n\
-+\tReturns: a dict representation of a userattr_t struct:\n\
-+\t\t\"name\": username\n\
-+\t\t\"qualifier\": reserved\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value");
-+
-+PyDoc_STRVAR(pyrbac_getusernam__doc__, "Searches for a user_attr entry with a \
-+given user name\n\
-+\tArgument: \'username\'\n\
-+\tReturns: a dict representation of a userattr_t struct:\n\
-+\t\t\"name\": username\n\
-+\t\t\"qualifier\": reserved\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value");
-+
-+PyDoc_STRVAR(pyrbac_getuseruid__doc__, "Searches for a user_attr entry with a \
-+given uid\n\
-+\tArgument: uid\n\
-+\tReturns: a dict representation of a userattr_t struct:\n\
-+\t\t\"name\": username\n\
-+\t\t\"qualifier\": reserved\n\
-+\t\t\"res1\": reserved\n\
-+\t\t\"res2\": reserved\n\
-+\t\t\"attributes\": A Python dict keyed by attribute & valued as either a list \
-+or a string depending on value");
-+
-+static PyMethodDef Userattr_methods[] = {
-+	{"setuserattr", pyrbac_setuserattr, METH_NOARGS, pyrbac_setuserattr__doc__},
-+	{"enduserattr", pyrbac_enduserattr, METH_NOARGS, pyrbac_enduserattr__doc__},
-+	{"getuserattr", pyrbac_getuserattr, METH_NOARGS, pyrbac_getuserattr__doc__},
-+	{"fgetuserattr", pyrbac_fgetuserattr, METH_VARARGS, pyrbac_fgetuserattr__doc__},
-+	{"getusernam", pyrbac_getusernam, METH_VARARGS, pyrbac_getusernam__doc__},
-+	{"getuseruid", pyrbac_getuseruid, METH_VARARGS, pyrbac_getuseruid__doc__},
-+	{NULL}
-+};
-+
-+PyTypeObject UserattrType = {
-+	PyObject_HEAD_INIT(NULL)
-+	0,                         /*ob_size*/
-+	"rbac.userattr",             /*tp_name*/
-+	sizeof(Userattr),             /*tp_basicsize*/
-+	0,                         /*tp_itemsize*/
-+	(destructor)Userattr_dealloc, /*tp_dealloc*/
-+	0,                         /*tp_print*/
-+	0,                         /*tp_getattr*/
-+	0,                         /*tp_setattr*/
-+	0,                         /*tp_compare*/
-+	0,                         /*tp_repr*/
-+	0,                         /*tp_as_number*/
-+	0,                         /*tp_as_sequence*/
-+	0,                         /*tp_as_mapping*/
-+	0,                         /*tp_hash */
-+	0,                         /*tp_call*/
-+	0,                         /*tp_str*/
-+	0,                         /*tp_getattro*/
-+	0,                         /*tp_setattro*/
-+	0,                         /*tp_as_buffer*/
-+	Py_TPFLAGS_DEFAULT |
-+	Py_TPFLAGS_BASETYPE |
-+	Py_TPFLAGS_HAVE_ITER, /*tp_flags*/
-+	pyrbac_userattr__doc__,    /* tp_doc */
-+	0,		               /* tp_traverse */
-+	0,		               /* tp_clear */
-+	0,		               /* tp_richcompare */
-+	0,		               /* tp_weaklistoffset */
-+	pyrbac_userattr__iter__,		               /* tp_iter */
-+	pyrbac_userattr_next,         /* tp_iternext */
-+	Userattr_methods,             /* tp_methods */
-+	0,             /* tp_members */
-+	0,                         /* tp_getset */
-+	0,                         /* tp_base */
-+	0,                         /* tp_dict */
-+	0,                         /* tp_descr_get */
-+	0,                         /* tp_descr_set */
-+	0,                         /* tp_dictoffset */
-+	(initproc)Userattr_init,      /* tp_init */
-+	0,                         /* tp_alloc */
-+	Userattr_new,                 /* tp_new */
-+};
-diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py
---- Python-2.6.4/setup.py
-+++ Python-2.6.4/setup.py
-@@ -1290,6 +1290,22 @@
-             exts.append( Extension('dlpi', ['dlpimodule.c'],
-                                    libraries = ['dlpi']) )
- 
-+        # privileges module (Solaris)
-+        priv_inc = find_file('priv.h', [], inc_dirs)
-+        if priv_inc is not None:
-+            exts.append( Extension('privileges', ['privileges.c']))
-+
-+        # rbac module (Solaris)
-+        secdb_inc = find_file('secdb.h', [], inc_dirs)
-+        aa_inc = find_file('auth_attr.h', [], inc_dirs)
-+        ea_inc = find_file('exec_attr.h', [], inc_dirs)
-+        ua_inc = find_file('user_attr.h', [], inc_dirs)
-+        if secdb_inc is not None and aa_inc is not None and \
-+            ea_inc is not None and ua_inc is not None:
-+            exts.append( Extension('rbac', ['pyrbac.c', 'authattr.c', \
-+                                   'execattr.c', 'userattr.c'],
-+                                   libraries = ['nsl', 'socket', 'secdb']) )
-+
-         # Thomas Heller's _ctypes module
-         self.detect_ctypes(inc_dirs, lib_dirs)
- 
-diff --git Python-2.6.4/Lib/test/privrbac.py Python-2.6.4/Lib/test/privrbac.py
-new file mode 100644
---- /dev/null	2011-02-12 03:13:57.000000000 -0600
-+++ Python-2.6.4/Lib/test/privrbactest.py	2011-01-20 13:52:42.862305331 -0600
-@@ -0,0 +1,290 @@
-+#!/usr/bin/python2.6
-+#
-+# CDDL HEADER START
-+#
-+# The contents of this file are subject to the terms of the
-+# Common Development and Distribution License (the "License").
-+# You may not use this file except in compliance with the License.
-+#
-+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+# or http://www.opensolaris.org/os/licensing.
-+# See the License for the specific language governing permissions
-+# and limitations under the License.
-+#
-+# When distributing Covered Code, include this CDDL HEADER in each
-+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+# If applicable, add the following below this CDDL HEADER, with the
-+# fields enclosed by brackets "[]" replaced with your own identifying
-+# information: Portions Copyright [yyyy] [name of copyright owner]
-+#
-+# CDDL HEADER END
-+#
-+
-+# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-+# Use is subject to license terms.
-+
-+import privileges
-+import rbac
-+import os
-+import sys
-+import tempfile
-+
-+# privileges tests
-+
-+def test_setppriv():
-+    amchild = os.fork()
-+    if amchild == 0:
-+        if privileges.setppriv(privileges.PRIV_OFF, privileges.PRIV_EFFECTIVE, 
-+            ['proc_fork']):
-+            try:
-+                os.fork()
-+                sys.exit(1)
-+            except OSError, e:
-+                sys.exit(0)
-+
-+    child = os.wait()
-+    if child[1] is not 0:
-+        print "setppriv. Bad exit status from pid %i\n" % child[0]
-+        return False
-+    return True
-+
-+def test_getppriv():
-+    if 'proc_fork' in privileges.getppriv(privileges.PRIV_LIMIT):
-+        return True
-+    print "getppriv or PRIV_PROC_FORK not in PRIV_LIMIT.\n"
-+    return False
-+
-+def test_priv_ineffect():
-+    if privileges.priv_ineffect('proc_fork'):
-+        return True
-+    print "priv_ineffect or PRIV_PROC_FORK not in effect\n"
-+    return False
-+
-+# authattr tests
-+
-+def test_chkauthattr():
-+    try:
-+        a = rbac.authattr()
-+    except Exception, e:
-+        print "Could not instantiate authattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.chkauthattr('solaris.*', 'root')
-+    except Exception, e:
-+        print "chkauthattr failed: %s\n" % e
-+        return False
-+    if not res:
-+        print "chkauthattr failed or \'root\' lacks \'solaris.*\'\n"
-+        return False
-+    return True
-+
-+def test_getauthattr():
-+    try:
-+        a = rbac.authattr()
-+    except Exception, e:
-+        print "Could not instantiate authattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getauthattr()
-+    except Exception, e:
-+        print "getauthattr failed: %s\n" % e
-+        return False
-+    if not 'name' in res.keys():
-+        print "getauthattr failed\n"
-+        return False
-+    return True
-+
-+def test_getauthnam():
-+    try:
-+        a = rbac.authattr()
-+    except Exception, e:
-+        print "Could not instantiate authattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getauthnam('solaris.')
-+    except Exception, e:
-+        print "getauthnam failed: %s\n" % e
-+        return False
-+    if not res:
-+        print "getauthnam failed or \'solaris.\' not in auth_attr(4)\n"
-+        return False
-+    return True
-+
-+def test_authattr_iter():
-+    try:
-+        a = rbac.authattr()
-+    except Exception, e:
-+        print "Could not instantiate authattr object: %s\n" % e
-+        return False
-+    res = a.next()
-+    if not 'name' in res.keys() or type(a) != type(a.__iter__()):
-+        print "authattr object is not an iterable\n"
-+        return False
-+    return True
-+
-+# execattr tests
-+
-+def test_getexecattr():
-+    try:
-+        a = rbac.execattr()
-+    except Exception, e:
-+        print "Could not instantiate execattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getexecattr()
-+    except Exception, e:
-+        print "getexecattr failed: %s\n" % e
-+        return False
-+    if not 'name' in res.keys():
-+        print "getexecattr failed\n"
-+        return False
-+    return True
-+
-+def test_getexecuser():
-+    try:
-+        a = rbac.execattr()
-+    except Exception, e:
-+        print "Could not instantiate execattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getexecuser("root", "act", "*;*;*;*;*")
-+    except Exception, e:
-+        print "getexecuser failed: %s\n" % e
-+        return False
-+    if not res:
-+        print "getexecuser failed or \'root\' not assigned to \'act\', " \
-+            "\'*;*;*;*;*\' \n"
-+        return False
-+    return True
-+
-+
-+def test_getexecprof():
-+    try:
-+        a = rbac.execattr()
-+    except Exception, e:
-+        print "Could not instantiate execattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getexecprof("All", "cmd", "*")
-+    except Exception, e:
-+        print "getexecprof failed: %s\n" % e
-+        return False
-+    if not res:
-+        print "getexecprof failed or \'All\' not granted \'cmd\' : \'*\'\n"
-+        return False
-+    return True
-+
-+def test_execattr_iter():
-+    try:
-+        a = rbac.execattr()
-+    except Exception, e:
-+        print "Could not instantiate execattr object: %s\n" % e
-+        return False
-+    res = a.next()
-+    if not 'name' in res.keys() or type(a) != type(a.__iter__()):
-+        print "execattr object is not an iterable\n"
-+        return False
-+    return True
-+
-+# userattr tests
-+
-+def test_getuserattr():
-+    try:
-+        a = rbac.userattr()
-+    except Exception, e:
-+        print "Could not instantiate userattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getuserattr()
-+    except Exception, e:
-+        print "getuserattr failed: %s\n" % e
-+        return False
-+    if not 'name' in res.keys():
-+        print "getuserattr failed\n"
-+        return False
-+    return True
-+
-+def test_fgetuserattr():
-+    temp = tempfile.NamedTemporaryFile()
-+    temp.write("user::::profiles=Software Installation;roles=foo;"\
-+        "auths=solaris.foo.bar")
-+    temp.seek(0)
-+    try:
-+        a = rbac.userattr()
-+    except Exception, e:
-+        print "Could not instantiate userattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.fgetuserattr(temp.name)
-+        temp.close()    
-+    except Exception, e:
-+        print "fgetuserattr failed: %s\n" % e
-+        temp.close()
-+        return False
-+    if not 'name' in res.keys():
-+        print "fgetuserattr failed\n"
-+        return False
-+    return True
-+
-+def test_getuseruid():
-+    try:
-+        a = rbac.userattr()
-+    except Exception, e:
-+        print "Could not instantiate userattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getuseruid(0)
-+    except Exception, e:
-+        print "getusernam failed: %s\n" % e
-+        return False
-+    if not 'name' in res:
-+        print "getusernam failed or no uid 0\n"
-+        return False
-+    return True
-+
-+def test_getusernam():
-+    try:
-+        a = rbac.userattr()
-+    except Exception, e:
-+        print "Could not instantiate userattr object: %s\n" % e
-+        return False
-+    try:
-+        res = a.getusernam('root')
-+    except Exception, e:
-+        print "getusernam failed: %s\n" % e
-+        return False
-+    if not 'name' in res:
-+        print "getusernam failed or no \'root\' user\n"
-+        return False
-+    return True
-+
-+def test_userattr_iter():
-+    try:
-+        a = rbac.userattr()
-+    except Exception, e:
-+        print "Could not instantiate userattr object: %s\n" % e
-+        return False
-+    res = a.next()
-+    if not 'name' in res.keys() or type(a) != type(a.__iter__()):
-+        print "userattr object is not an iterable\n"
-+        return False
-+    return True
-+
-+if not test_setppriv() or not test_getppriv() or not test_priv_ineffect():
-+    print "*** Failures detected in privileges module\n"    
-+    sys.exit(1)
-+
-+if not test_getauthattr() or not test_chkauthattr() or not test_getauthnam() \
-+    or not test_authattr_iter:
-+    print "*** Failures detected in rbac.authattr\n"
-+    sys.exit(1)
-+
-+if not test_getexecattr() or not test_getexecuser() or not test_getexecprof() \
-+    or not test_execattr_iter():
-+    print "*** Failures detected in rbac.execattr\n"
-+    sys.exit(1)
-+
-+if not test_getuserattr() or not test_fgetuserattr() or not test_getusernam()\
-+    or not test_getuseruid() or not test_userattr_iter():
-+    print "*** Failures detected in rbac.userattr\n"
-+    sys.exit(1)
--- old/build/python26/patches/Python26-17-netpacket-packet-h.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,54 +0,0 @@
-diff -ruN Python-2.6.7-orig/Modules/socketmodule.c Python-2.6.7/Modules/socketmodule.c
---- Python-2.6.7-orig/Modules/socketmodule.c	2010-05-23 15:22:08.000000000 +0000
-+++ Python-2.6.7/Modules/socketmodule.c	2012-02-15 20:29:06.690235573 +0000
-@@ -81,6 +81,14 @@
- 
- */
- 
-+#ifdef HAVE_NETPACKET_PACKET_H
-+#ifdef sun
-+#define USE_NETPACKET_PACKET_H 0
-+#else
-+#define USE_NETPACKET_PACKET_H 1
-+#endif
-+#endif
-+
- #ifdef __APPLE__
-   /*
-    * inet_aton is not available on OSX 10.3, yet we want to use a binary
-@@ -1096,7 +1104,7 @@
-         }
- #endif
- 
--#ifdef HAVE_NETPACKET_PACKET_H
-+#ifdef USE_NETPACKET_PACKET_H
-     case AF_PACKET:
-     {
-         struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
-@@ -1387,7 +1395,7 @@
-     }
- #endif
- 
--#ifdef HAVE_NETPACKET_PACKET_H
-+#ifdef USE_NETPACKET_PACKET_H
-     case AF_PACKET:
-     {
-         struct sockaddr_ll* addr;
-@@ -1564,7 +1572,7 @@
-     }
- #endif
- 
--#ifdef HAVE_NETPACKET_PACKET_H
-+#ifdef USE_NETPACKET_PACKET_H
-     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
-+#ifdef 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);
--- old/build/python26/patches/Python26-18-readline.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,31 +0,0 @@
-diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py
---- Python-2.6.4/setup.py
-+++ Python-2.6.4/setup.py
-@@ -572,6 +572,14 @@
-                 # This way a staticly linked custom readline gets picked up
-                 # before the (broken) dynamic library in /usr/lib.
-                 readline_extra_link_args = ('-Wl,-search_paths_first',)
-+            elif sys.platform == 'sunos5':
-+                if sys.maxint != 9223372036854775807L:
-+                    readline_extra_link_args = ('-Wl,-zrecord,-L/usr/gnu/lib,-R/usr/gnu/lib,-lreadline,-lncurses',)
-+                else:
-+                    if os.path.exists('/usr/gnu/lib/sparcv9'):
-+                        readline_extra_link_args = ('-Wl,-zrecord,-L/usr/gnu/lib/sparcv9,-R/usr/gnu/lib/sparcv9,-lreadline,-lncurses',)
-+                    else:
-+                        readline_extra_link_args = ('-Wl,-zrecord,-L/usr/gnu/lib/amd64,-R/usr/gnu/lib/amd64,-lreadline,-lncurses',)
-             else:
-                 readline_extra_link_args = ()
- 
-@@ -588,6 +596,12 @@
-                                                ['/usr/lib/termcap'],
-                                                'termcap'):
-                 readline_libs.append('termcap')
-+
-+            if sys.platform == 'sunos5':
-+                # ugly hack to make the build respect -zrecord set in
-+                # readline_extra_link_args above
-+                readline_libs = []
-+
-             exts.append( Extension('readline', ['readline.c'],
-                                    library_dirs=['/usr/lib/termcap'],
-                                    extra_link_args=readline_extra_link_args,
--- old/build/python26/patches/Python26-19-ext-stdio.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,34 +0,0 @@
-diff --git Python-2.6.4/Modules/python.c Python-2.6.4/Modules/python.c
---- Python-2.6.4/Modules/python.c
-+++ Python-2.6.4/Modules/python.c
-@@ -6,6 +6,13 @@
- #include <floatingpoint.h>
- #endif
- 
-+#if defined(sun) && defined(__SVR4) && !defined(_LP64)
-+#define USE_EXTENDED_FILE_STDIO 1
-+#include <stdio.h>
-+#include <stdio_ext.h>
-+#include <signal.h>
-+#endif
-+
- int
- main(int argc, char **argv)
- {
-@@ -20,5 +27,16 @@
- 	m = fpgetmask();
- 	fpsetmask(m & ~FP_X_OFL);
- #endif
-+#ifdef USE_EXTENDED_FILE_STDIO
-+	/* enable extended FILE facility on Solaris so that Python
-+           apps can keep more than 256 file descriptors open */
-+	struct rlimit rlp;
-+	(void) getrlimit(RLIMIT_NOFILE, &rlp);
-+	rlp.rlim_cur = rlp.rlim_max;
-+	if (setrlimit(RLIMIT_NOFILE, &rlp) != -1) {
-+		enable_extended_FILE_stdio(-1, 0);
-+	}
-+#endif
-+
- 	return Py_Main(argc, argv);
- }
--- old/build/python26/patches/Python26-20-py_db.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,1040 +0,0 @@
-diff -ruN Python-2.6.7-orig/Makefile.pre.in Python-2.6.7/Makefile.pre.in
---- Python-2.6.7-orig/Makefile.pre.in	2010-08-01 22:05:31.000000000 +0000
-+++ Python-2.6.7/Makefile.pre.in	2012-02-16 03:15:25.704717695 +0000
-@@ -352,7 +352,7 @@
- 
- # Default target
- all:		build_all
--build_all:	$(BUILDPYTHON) oldsharedmods sharedmods
-+build_all:	$(BUILDPYTHON) oldsharedmods sharedmods build-py_db
- 
- # Compile a binary with gcc profile guided optimization.
- profile-opt:
-@@ -663,6 +663,19 @@
- 
- $(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
- 
-+SHLIB_FLAGS = -shared -fpic -Wl,-M,$(srcdir)/py_db/mapfile-vers
-+
-+libpython2.6_db.so.1.0:	$(srcdir)/py_db/libpython26_db.c
-+	$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(SHLIB_FLAGS) $<
-+
-+check_offset:	$(srcdir)/py_db/check_offsets.c
-+	$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $<
-+
-+build-py_db:	libpython2.6_db.so.1.0 check_offset
-+
-+install-py_db:	libpython2.6_db.so.1.0 check_offset
-+	$(INSTALL_SHARED) libpython2.6_db.so.1.0 $(DESTDIR)$(LIBDIR)
-+	$(INSTALL_PROGRAM) check_offset $(DESTDIR)$(BINDIR)
- 
- ######################################################################
- 
-@@ -726,7 +739,7 @@
- 		$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
- 
- # Install everything
--install:	@FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
-+install:	@FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@ install-py_db
- 
- # Install almost everything without disturbing previous versions
- altinstall:	@FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
-diff -ruN Python-2.6.7-orig/py_db/check_offsets.c Python-2.6.7/py_db/check_offsets.c
---- Python-2.6.7-orig/py_db/check_offsets.c	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/py_db/check_offsets.c	2012-02-16 03:13:33.350841679 +0000
-@@ -0,0 +1,88 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+/*
-+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#include <stdio.h>
-+
-+#include <Python.h>
-+#include <frameobject.h>
-+
-+#include "libpython26_db_32.h"
-+
-+#if 0
-+#define	offsetof(s, m)	((size_t)(&(((s *)0)->m)))
-+#endif
-+
-+int
-+main(void)
-+{
-+/*
-+ * PyCodeObject co_name
-+ * PyCodeObject co_filename
-+ * PyCodeObject co_lnotab
-+ * PyFrameObject f_back
-+ * PyFrameObject f_code
-+ * PyFrameObject f_lasti
-+ * PyInterpreterState next
-+ * PyInterpreterState tstate_head
-+ * PyStringObject ob_sval
-+ * PyStringObject ob_size
-+ * PyThreadState frame
-+ * PyThreadState next
-+ */
-+
-+	printf("struct member: native 32\n");
-+	printf("PyCodeObject co_name: %d %d\n", offsetof(PyCodeObject, co_name),
-+	    offsetof(PyCodeObject32, co_name));
-+	printf("PyCodeObject co_filename: %d %d\n", offsetof(PyCodeObject,
-+	    co_filename), offsetof(PyCodeObject32, co_filename));
-+	printf("PyCodeObject co_lnotab: %d %d\n", offsetof(PyCodeObject,
-+	    co_lnotab), offsetof(PyCodeObject32, co_lnotab));
-+	printf("PyFrameObject f_back: %d %d\n", offsetof(PyFrameObject, f_back),
-+	    offsetof(PyFrameObject32, f_back));
-+	printf("PyFrameObject f_code: %d %d\n", offsetof(PyFrameObject, f_code),
-+	    offsetof(PyFrameObject32, f_code));
-+	printf("PyFrameObject f_lasti: %d %d\n", offsetof(PyFrameObject,
-+	    f_lasti), offsetof(PyFrameObject32, f_lasti));
-+	printf("PyInterpreterState next: %d %d\n", offsetof(PyInterpreterState,
-+	    next), offsetof(PyInterpreterState32, next));
-+	printf("PyInterpreterState tstate_head: %d %d\n",
-+	    offsetof(PyInterpreterState, tstate_head),
-+	    offsetof(PyInterpreterState32, tstate_head));
-+	printf("PyStringObject ob_sval: %d %d\n", offsetof(PyStringObject,
-+	    ob_sval), offsetof(PyStringObject32, ob_sval));
-+	printf("PyStringObject ob_size: %d %d\n", offsetof(PyStringObject,
-+	    ob_size), offsetof(PyStringObject32, ob_size));
-+	printf("PyThreadState frame: %d %d\n", offsetof(PyThreadState, frame),
-+	    offsetof(PyThreadState32, frame));
-+	printf("PyThreadState next: %d %d\n", offsetof(PyThreadState, next),
-+	    offsetof(PyThreadState32, next));
-+
-+	printf("\nObject sizes\n");
-+	printf("PyObject: %d %d\n", sizeof (PyObject), sizeof (PyObject32));
-+	printf("PyVarObject: %d %d\n", sizeof (PyVarObject),
-+	    sizeof (PyVarObject32));
-+
-+	return (0);
-+}
-diff -ruN Python-2.6.7-orig/py_db/libpython26_db_32.h Python-2.6.7/py_db/libpython26_db_32.h
---- Python-2.6.7-orig/py_db/libpython26_db_32.h	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/py_db/libpython26_db_32.h	2012-02-16 03:13:33.351452724 +0000
-@@ -0,0 +1,122 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+/*
-+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#ifndef	_LIBPYTHON26_DB_32_H
-+#define	_LIBPYTHON26_DB_32_H
-+
-+#ifdef	__cplusplus
-+extern "C" {
-+#endif
-+
-+#include <sys/types.h>
-+
-+/*
-+ * Define 32-bit Python data structures for use by the 64-bit debugger.  This
-+ * is so that a 64-bit debugger may properly examine a 32-bit process.
-+ *
-+ * In many cases, the debug library is only concerned with a few fields in the
-+ * Python structure.  In that case, the other ancillary fields are elided.
-+ */
-+
-+typedef uint32_t uintptr32_t;
-+typedef int32_t Py_ssize32_t;
-+
-+typedef struct _is32 {
-+	uintptr32_t	next;
-+	uintptr32_t	tstate_head;
-+} PyInterpreterState32;
-+
-+typedef struct _ts32 {
-+	uintptr32_t	next;
-+	uintptr32_t	interp;
-+	uintptr32_t	frame;
-+} PyThreadState32;
-+
-+#define	PyObject_HEAD32			\
-+	Py_ssize32_t	ob_refcnt;	\
-+	uintptr32_t	ob_type;
-+
-+#define	PyObject_VAR_HEAD32		\
-+	PyObject_HEAD32			\
-+	Py_ssize32_t	ob_size;
-+
-+typedef struct {
-+	PyObject_HEAD32
-+} PyObject32;
-+
-+typedef struct {
-+	PyObject_VAR_HEAD32
-+} PyVarObject32;
-+
-+typedef struct {
-+	PyObject_VAR_HEAD32
-+	int32_t		ob_shash;
-+	int		ob_sstate;
-+	char		ob_sval[1];
-+} PyStringObject32;
-+
-+#define	Py_SIZE32(ob)			(((PyVarObject32*)(ob))->ob_size)
-+#define	PyString_GET_SIZE32(op)		Py_SIZE32(op)
-+#define	PyString_AS_STRING32(op)	(((PyStringObject32 *)(op))->ob_sval)
-+
-+typedef struct {
-+	PyObject_VAR_HEAD32
-+	uintptr32_t	f_back;
-+	uintptr32_t	f_code;
-+	uintptr32_t	f_builtins;
-+	uintptr32_t	f_globals;
-+	uintptr32_t	f_locals;
-+	uintptr32_t	f_valuestack;
-+	uintptr32_t	f_stacktop;
-+	uintptr32_t	f_trace;
-+	uintptr32_t	f_exc_typpe, f_exc_value, f_exc_traceback;
-+	uintptr32_t	f_tstate;
-+	int		f_lasti;
-+	int		f_lineno;
-+} PyFrameObject32;
-+
-+typedef struct {
-+	PyObject_HEAD32
-+	int		co_argcount;
-+	int		co_nlocals;
-+	int		co_stacksize;
-+	int		co_flags;
-+	uintptr32_t	co_code;
-+	uintptr32_t	co_consts;
-+	uintptr32_t	co_names;
-+	uintptr32_t	co_varnames;
-+	uintptr32_t	co_freevars;
-+	uintptr32_t	co_cellvars;
-+	uintptr32_t	co_filename;
-+	uintptr32_t	co_name;
-+	int		co_firstlineno;
-+	uintptr32_t	co_lnotab;
-+} PyCodeObject32;
-+
-+#ifdef	__cplusplus
-+}
-+#endif
-+
-+#endif	/* _LIBPYTHON26_DB_32_H */
-diff -ruN Python-2.6.7-orig/py_db/libpython26_db.c Python-2.6.7/py_db/libpython26_db.c
---- Python-2.6.7-orig/py_db/libpython26_db.c	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/py_db/libpython26_db.c	2012-02-16 03:13:33.351199719 +0000
-@@ -0,0 +1,655 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+/*
-+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <gelf.h>
-+
-+#include <Python.h>
-+#include <frameobject.h>
-+
-+#include "libpython26_db.h"
-+#if defined(_LP64)
-+#include "libpython26_db_32.h"
-+#endif /* _LP64 */
-+
-+/*
-+ * Because MDB always runs the debugger in the same datamodel as the target,
-+ * only functions that are used by the procfs part of this interface (or shared
-+ * between the two) are written as 64->32 aware.
-+ */
-+typedef struct pydb_arch_ops {
-+	ssize_t	(*strobj_readdata)(pydb_agent_t *, uintptr_t, unsigned char *,
-+	    size_t);
-+	int	(*frameinfo)(pydb_agent_t *, uintptr_t, char *,
-+	    size_t, char *, size_t, int *);
-+} pydb_arch_ops_t;
-+
-+struct pydb_agent {
-+	struct ps_prochandle *pdb_ph;
-+	int pdb_vers;
-+	int pdb_is_64bit;
-+	int pdb_datamodel;
-+	const pydb_arch_ops_t *pdb_ops;
-+};
-+
-+typedef uintptr_t (*pdi_next_cb_t)(pydb_iter_t *);
-+
-+struct pydb_iter {
-+	struct ps_prochandle *pdi_ph;
-+	uintptr_t pdi_current;
-+	pdi_next_cb_t pdi_nextf;
-+};
-+
-+#define	LIBPYTHON	"libpython2.6.so"
-+
-+#define	MIN(x, y)	(((x) < (y)) ? (x) : (y))
-+
-+/* Generic interface to helper functions */
-+static ssize_t pydb_strobj_readdata(pydb_agent_t *py, uintptr_t addr,
-+    unsigned char *buf, size_t buf_len);
-+static int pydb_getlno(pydb_agent_t *py, uintptr_t lnotab_addr, int firstline,
-+    int lastinst);
-+static int pydb_frameinfo(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno);
-+
-+/* datamodel specific implementation of helper functions */
-+static ssize_t pydb_strobj_readdata_native(pydb_agent_t *py, uintptr_t addr,
-+    unsigned char *buf, size_t buf_len);
-+static int pydb_frameinfo_native(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno);
-+
-+#if defined (_LP64)
-+static ssize_t pydb_strobj_readdata_32(pydb_agent_t *py, uintptr_t addr,
-+    unsigned char *buf, size_t buf_len);
-+static int pydb_frameinfo_32(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno);
-+#endif /* _LP64 */
-+
-+static ssize_t pydb_strobj_readstr(pydb_agent_t *py, uintptr_t addr, char *buf,
-+    size_t len);
-+
-+/* Iterator function next routines.  Plugable, configured by iterator init */
-+static uintptr_t pydb_frame_iter_next(pydb_iter_t *iter);
-+static uintptr_t pydb_interp_iter_next(pydb_iter_t *iter);
-+static uintptr_t pydb_thread_iter_next(pydb_iter_t *iter);
-+
-+static const char *strbasename(const char *s);
-+
-+static const pydb_arch_ops_t arch_ops_native = {
-+	.frameinfo = pydb_frameinfo_native,
-+	.strobj_readdata = pydb_strobj_readdata_native,
-+};
-+
-+#if defined (_LP64)
-+static const pydb_arch_ops_t arch_ops_32 = {
-+	.frameinfo = pydb_frameinfo_32,
-+	.strobj_readdata = pydb_strobj_readdata_32,
-+};
-+#endif /* _LP64 */
-+
-+static const char *
-+strbasename(const char *s)
-+{
-+	const char *p = strrchr(s, '/');
-+
-+	if (p == NULL)
-+		return (s);
-+
-+	return (++p);
-+}
-+
-+/* Agent creation / destruction routines */
-+
-+pydb_agent_t *
-+pydb_agent_create(struct ps_prochandle *P, int vers)
-+{
-+	pydb_agent_t *py;
-+	int datamodel;
-+
-+	if (vers != PYDB_VERSION) {
-+		errno = ENOTSUP;
-+		return (NULL);
-+	}
-+
-+	if (ps_pdmodel(P, &datamodel) != PS_OK) {
-+		return (NULL);
-+	}
-+
-+	py = (pydb_agent_t *)malloc(sizeof (pydb_agent_t));
-+	if (py == NULL) {
-+		return (NULL);
-+	}
-+
-+	py->pdb_ph = P;
-+	py->pdb_vers = vers;
-+	py->pdb_datamodel = datamodel;
-+	py->pdb_is_64bit = 0;
-+	py->pdb_ops = &arch_ops_native;
-+
-+#if defined (_LP64)
-+	py->pdb_is_64bit = (datamodel == PR_MODEL_LP64);
-+	if (!py->pdb_is_64bit) {
-+		py->pdb_ops = &arch_ops_32;
-+	}
-+#endif /* _LP64 */
-+
-+	return (py);
-+}
-+
-+void
-+pydb_agent_destroy(pydb_agent_t *py)
-+{
-+	if (py == NULL) {
-+		return;
-+	}
-+
-+	free(py);
-+}
-+
-+/* Helper functions */
-+static int
-+pydb_getlno(pydb_agent_t *py, uintptr_t lnotab_addr, int firstline,
-+    int lastinst)
-+{
-+	unsigned char lnotab[4096];
-+	ssize_t lnotab_len;
-+	int addr, line;
-+	int i;
-+
-+	lnotab_len = pydb_strobj_readdata(py, lnotab_addr, lnotab,
-+	    sizeof (lnotab));
-+	if (lnotab_len < 0) {
-+		return (-1);
-+	}
-+
-+	/*
-+	 * Python's line number algorithm is arcane. See here for details:
-+	 * http://svn.python.org/projects/python/trunk/Objects/lnotab_notes.txt
-+	 */
-+
-+	line = firstline;
-+	for (addr = i = 0; i < lnotab_len; i += 2) {
-+		if (addr + lnotab[i] > lastinst) {
-+			break;
-+		}
-+		addr += lnotab[i];
-+		line += lnotab[i + 1];
-+	}
-+
-+	return (line);
-+}
-+
-+static ssize_t
-+pydb_strobj_readdata(pydb_agent_t *py, uintptr_t addr, unsigned char *buf,
-+    size_t buf_len)
-+{
-+	return (py->pdb_ops->strobj_readdata(py, addr, buf, buf_len));
-+}
-+
-+static ssize_t
-+pydb_strobj_readdata_native(pydb_agent_t *py, uintptr_t addr,
-+    unsigned char *buf, size_t buf_len)
-+{
-+	PyStringObject sobj;
-+	ssize_t obj_sz;
-+	ssize_t read_sz;
-+	psaddr_t straddr;
-+
-+	/*
-+	 * PyStringObjects are variable size.  The size of the PyStringObject
-+	 * struct is fixed, and known at compile time; however, the size of the
-+	 * associated buffer is variable.  The char[1] element at the end of the
-+	 * structure contains the string, and the ob_size of the PyStringObject
-+	 * indicates how much extra space was allocated to contain the string
-+	 * buffer at the object's tail.  Read in the fixed size portion of the
-+	 * object first, and then read the contents of the data buffer into the
-+	 * buffer passed by the caller.
-+	 */
-+
-+	if (ps_pread(py->pdb_ph, addr, &sobj, sizeof (PyStringObject))
-+	    != PS_OK) {
-+		return (-1);
-+	}
-+
-+	obj_sz = (ssize_t)PyString_GET_SIZE(&sobj);
-+
-+	read_sz = MIN(obj_sz, (ssize_t)buf_len);
-+	straddr = (psaddr_t)(addr + offsetof(PyStringObject, ob_sval));
-+
-+	if (ps_pread(py->pdb_ph, straddr, buf, (size_t)read_sz) != PS_OK) {
-+		return (-1);
-+	}
-+
-+	return (read_sz);
-+}
-+
-+#if defined(_LP64)
-+static ssize_t
-+pydb_strobj_readdata_32(pydb_agent_t *py, uintptr_t addr,
-+    unsigned char *buf, size_t buf_len)
-+{
-+	PyStringObject32 sobj;
-+	ssize_t obj_sz;
-+	ssize_t read_sz;
-+	psaddr_t straddr;
-+
-+	/*
-+	 * PyStringObjects are variable size.  The size of the PyStringObject
-+	 * struct is fixed, and known at compile time; however, the size of the
-+	 * associated buffer is variable.  The char[1] element at the end of the
-+	 * structure contains the string, and the ob_size of the PyStringObject
-+	 * indicates how much extra space was allocated to contain the string
-+	 * buffer at the object's tail.  Read in the fixed size portion of the
-+	 * object first, and then read the contents of the data buffer into the
-+	 * buffer passed by the caller.
-+	 */
-+
-+	if (ps_pread(py->pdb_ph, addr, &sobj, sizeof (PyStringObject32))
-+	    != PS_OK) {
-+		return (-1);
-+	}
-+
-+	obj_sz = (ssize_t)PyString_GET_SIZE32(&sobj);
-+
-+	read_sz = MIN(obj_sz, (ssize_t)buf_len);
-+	straddr = (psaddr_t)(addr + offsetof(PyStringObject32, ob_sval));
-+
-+	if (ps_pread(py->pdb_ph, straddr, buf, (size_t)read_sz) != PS_OK) {
-+		return (-1);
-+	}
-+
-+	return (read_sz);
-+}
-+#endif /* _LP64 */
-+
-+/*
-+ * Most Python PyStringObjects contain strings, as one would expect.  However,
-+ * due to some sleazy hackery in parts of the Python code, some string objects
-+ * are used as buffers for binary data.  In the general case,
-+ * pydb_strobj_readstr() should be used to read strings out of string objects.
-+ * It wraps pydb_strobj_readdata(), which should be used by callers only when
-+ * trying to retrieve binary data.  (This routine does some string cleanup).
-+ */
-+static ssize_t
-+pydb_strobj_readstr(pydb_agent_t *py, uintptr_t addr, char *buf,
-+    size_t buf_len)
-+{
-+	ssize_t read_sz;
-+
-+	read_sz = pydb_strobj_readdata(py, addr, (unsigned char *)buf, buf_len);
-+
-+	if (read_sz >= 0) {
-+		if (read_sz >= buf_len) {
-+			read_sz = buf_len - 1;
-+		}
-+
-+		buf[read_sz] = '\0';
-+	}
-+
-+	return (read_sz);
-+}
-+
-+
-+static int
-+pydb_frameinfo(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno)
-+{
-+	return (py->pdb_ops->frameinfo(py, addr, funcnm, funcnm_sz,
-+	    filenm, filenm_sz, lineno));
-+}
-+
-+static int
-+pydb_frameinfo_native(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno)
-+{
-+	PyFrameObject fo;
-+	PyCodeObject co;
-+	ssize_t rc;
-+
-+	if (ps_pread(py->pdb_ph, addr, &fo, sizeof (PyFrameObject))
-+	    != PS_OK) {
-+		return (-1);
-+	}
-+
-+	if (ps_pread(py->pdb_ph, (uintptr_t)fo.f_code, &co,
-+	    sizeof (PyCodeObject)) != PS_OK) {
-+		return (-1);
-+	}
-+
-+	rc = pydb_strobj_readstr(py, (uintptr_t)co.co_name, funcnm, funcnm_sz);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	rc = pydb_strobj_readstr(py, (uintptr_t)co.co_filename, filenm,
-+	    filenm_sz);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	*lineno = pydb_getlno(py, (uintptr_t)co.co_lnotab, co.co_firstlineno,
-+	    fo.f_lasti);
-+	if (*lineno < 0) {
-+		return (-1);
-+	}
-+
-+	return (0);
-+}
-+
-+#if defined (_LP64)
-+static int
-+pydb_frameinfo_32(pydb_agent_t *py, uintptr_t addr, char *funcnm,
-+    size_t funcnm_sz, char *filenm, size_t filenm_sz, int *lineno)
-+{
-+	PyFrameObject32 fo;
-+	PyCodeObject32 co;
-+	ssize_t rc;
-+
-+	if (ps_pread(py->pdb_ph, addr, &fo, sizeof (PyFrameObject32))
-+	    != PS_OK) {
-+		return (-1);
-+	}
-+
-+	if (ps_pread(py->pdb_ph, (uintptr_t)fo.f_code, &co,
-+	    sizeof (PyCodeObject32)) != PS_OK) {
-+		return (-1);
-+	}
-+
-+	rc = pydb_strobj_readstr(py, (uintptr_t)co.co_name, funcnm, funcnm_sz);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	rc = pydb_strobj_readstr(py, (uintptr_t)co.co_filename, filenm,
-+	    filenm_sz);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	*lineno = pydb_getlno(py, (uintptr_t)co.co_lnotab, co.co_firstlineno,
-+	    fo.f_lasti);
-+	if (*lineno < 0) {
-+		return (-1);
-+	}
-+
-+	return (0);
-+}
-+
-+#endif /* _LP64 */
-+
-+/* Functions that are part of the library's interface */
-+
-+/*
-+ * Given the address of a PyFrameObject, and a buffer of a known size,
-+ * fill the buffer with a description of the frame.
-+ */
-+int
-+pydb_get_frameinfo(pydb_agent_t *py, uintptr_t frame_addr, char *fbuf,
-+    size_t bufsz, int verbose)
-+{
-+	char funcname[1024];
-+	char filename[1024];
-+	char *fn;
-+	int lineno;
-+	int length = (py->pdb_is_64bit ? 16 : 8);
-+	int rc;
-+
-+	rc = pydb_frameinfo(py, frame_addr, funcname, sizeof (funcname),
-+	    filename, sizeof (filename), &lineno);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	if (!verbose) {
-+		fn = (char *)strbasename(filename);
-+	} else {
-+		fn = filename;
-+	}
-+
-+	(void) snprintf(fbuf, bufsz, "%0.*lx %s:%d %s()\n", length,
-+	    frame_addr, fn, lineno, funcname);
-+
-+	return (0);
-+}
-+
-+/*
-+ * Return a description about a PyFrameObject, if the object is
-+ * actually a PyFrameObject.  In this case, the pc argument is checked
-+ * to make sure that it came from a function that takes a PyFrameObject
-+ * as its first (argv[0]) argument.
-+ */
-+int
-+pydb_pc_frameinfo(pydb_agent_t *py, uintptr_t pc, uintptr_t frame_addr,
-+    char *fbuf, size_t bufsz)
-+{
-+	char funcname[1024];
-+	char filename[1024];
-+	int lineno;
-+	int rc;
-+	ps_sym_t psym;
-+
-+	/*
-+	 * If PC doesn't match PyEval_EvalFrameEx in either libpython
-+	 * or the executable, don't decode it.
-+	 */
-+	if (ps_pglobal_sym(py->pdb_ph, LIBPYTHON, "PyEval_EvalFrameEx", &psym)
-+	    != PS_OK) {
-+		return (-1);
-+	}
-+
-+	/* If symbol found, ensure that PC falls within PyEval_EvalFrameEx. */
-+	if (pc < psym.st_value || pc > psym.st_value + psym.st_size) {
-+		return (-1);
-+	}
-+
-+	rc = pydb_frameinfo(py, frame_addr, funcname, sizeof (funcname),
-+	    filename, sizeof (filename), &lineno);
-+	if (rc < 0) {
-+		return (-1);
-+	}
-+
-+	(void) snprintf(fbuf, bufsz, "[ %s:%d (%s) ]\n", filename, lineno,
-+	    funcname);
-+
-+	return (0);
-+}
-+
-+/*
-+ * Walks the list of PyInterpreterState objects.  If caller doesn't
-+ * supply address of list, this method will look it up.
-+ */
-+pydb_iter_t *
-+pydb_interp_iter_init(pydb_agent_t *py, uintptr_t addr)
-+{
-+	pydb_iter_t *itr;
-+	uintptr_t i_addr;
-+	int rc;
-+
-+	if (addr == 0) {
-+		rc = ps_pglobal_lookup(py->pdb_ph, LIBPYTHON, "interp_head",
-+		    (psaddr_t *)&addr);
-+		if (rc != PS_OK) {
-+			return (NULL);
-+		}
-+	}
-+
-+	if (ps_pread(py->pdb_ph, (uintptr_t)addr, &i_addr, sizeof (uintptr_t))
-+	    != PS_OK) {
-+		return (NULL);
-+	}
-+
-+	itr = malloc(sizeof (pydb_iter_t));
-+	if (itr == NULL) {
-+		return (NULL);
-+	}
-+
-+	itr->pdi_ph = py->pdb_ph;
-+	itr->pdi_current = i_addr;
-+	itr->pdi_nextf = pydb_interp_iter_next;
-+
-+	return (itr);
-+}
-+
-+static uintptr_t
-+pydb_interp_iter_next(pydb_iter_t *iter)
-+{
-+	PyInterpreterState st;
-+	uintptr_t cur;
-+
-+	cur = iter->pdi_current;
-+
-+	if (cur == 0) {
-+		return (cur);
-+	}
-+
-+	if (ps_pread(iter->pdi_ph, cur, &st, sizeof (PyInterpreterState))
-+	    != PS_OK) {
-+		iter->pdi_current = 0;
-+		return (0);
-+	}
-+
-+	iter->pdi_current = (uintptr_t)st.next;
-+
-+	return (cur);
-+}
-+
-+/*
-+ * Walk a list of Python PyFrameObjects.  The addr argument must be
-+ * the address of a valid PyThreadState object.
-+ */
-+pydb_iter_t *
-+pydb_frame_iter_init(pydb_agent_t *py, uintptr_t addr)
-+{
-+	pydb_iter_t *itr;
-+	PyThreadState ts;
-+
-+	if (ps_pread(py->pdb_ph, (uintptr_t)addr, &ts, sizeof (PyThreadState))
-+	    != PS_OK) {
-+		return (NULL);
-+	}
-+
-+	itr = malloc(sizeof (pydb_iter_t));
-+	if (itr == NULL) {
-+		return (NULL);
-+	}
-+
-+	itr->pdi_ph = py->pdb_ph;
-+	itr->pdi_current = (uintptr_t)ts.frame;
-+	itr->pdi_nextf = pydb_frame_iter_next;
-+
-+	return (itr);
-+}
-+
-+static uintptr_t
-+pydb_frame_iter_next(pydb_iter_t *iter)
-+{
-+	PyFrameObject fo;
-+	uintptr_t cur;
-+
-+	cur = iter->pdi_current;
-+
-+	if (cur == 0) {
-+		return (cur);
-+	}
-+
-+	if (ps_pread(iter->pdi_ph, cur, &fo, sizeof (PyFrameObject))
-+	    != PS_OK) {
-+		iter->pdi_current = 0;
-+		return (0);
-+	}
-+
-+	iter->pdi_current = (uintptr_t)fo.f_back;
-+
-+	return (cur);
-+}
-+
-+/*
-+ * Walk a list of Python PyThreadState objects.  The addr argument must be
-+ * the address of a valid PyInterpreterState object.
-+ */
-+pydb_iter_t *
-+pydb_thread_iter_init(pydb_agent_t *py, uintptr_t addr)
-+{
-+	pydb_iter_t *itr;
-+	PyInterpreterState is;
-+
-+	if (ps_pread(py->pdb_ph, (uintptr_t)addr, &is,
-+	    sizeof (PyInterpreterState)) != PS_OK) {
-+		return (NULL);
-+	}
-+
-+	itr = malloc(sizeof (pydb_iter_t));
-+	if (itr == NULL) {
-+		return (NULL);
-+	}
-+
-+	itr->pdi_ph = py->pdb_ph;
-+	itr->pdi_current = (uintptr_t)is.tstate_head;
-+	itr->pdi_nextf = pydb_thread_iter_next;
-+
-+	return (itr);
-+}
-+
-+static uintptr_t
-+pydb_thread_iter_next(pydb_iter_t *iter)
-+{
-+	PyThreadState ts;
-+	uintptr_t cur;
-+
-+	cur = iter->pdi_current;
-+
-+	if (cur == 0) {
-+		return (cur);
-+	}
-+
-+	if (ps_pread(iter->pdi_ph, cur, &ts, sizeof (PyThreadState)) != PS_OK) {
-+		iter->pdi_current = 0;
-+		return (0);
-+	}
-+
-+	iter->pdi_current = (uintptr_t)ts.next;
-+
-+	return (cur);
-+}
-+
-+
-+uintptr_t
-+pydb_iter_next(pydb_iter_t *iter)
-+{
-+	return (iter->pdi_nextf(iter));
-+}
-+
-+void
-+pydb_iter_fini(pydb_iter_t *iter)
-+{
-+	if (iter == NULL) {
-+		return;
-+	}
-+
-+	free(iter);
-+}
-diff -ruN Python-2.6.7-orig/py_db/libpython26_db.h Python-2.6.7/py_db/libpython26_db.h
---- Python-2.6.7-orig/py_db/libpython26_db.h	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/py_db/libpython26_db.h	2012-02-16 03:13:33.351318662 +0000
-@@ -0,0 +1,74 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+/*
-+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#ifndef	_LIBPYTHON26_DB_H
-+#define	_LIBPYTHON26_DB_H
-+
-+#include <proc_service.h>
-+
-+#ifdef	__cplusplus
-+extern "C" {
-+#endif
-+
-+/* Agent is opaque to library's consumers.  */
-+typedef struct pydb_agent pydb_agent_t;
-+
-+/*
-+ * Library's debug version is 1.  Changes to interface should increase this
-+ * number.
-+ */
-+#define	PYDB_VERSION	1
-+
-+/* Agent creation/destruction routines */
-+extern	pydb_agent_t	*pydb_agent_create(struct ps_prochandle *P, int vers);
-+extern	void		pydb_agent_destroy(pydb_agent_t *py);
-+
-+/* Used by callers that know they are looking at a PyFrameObject */
-+extern	int	pydb_get_frameinfo(pydb_agent_t *py, uintptr_t frame_addr,
-+    char *fbuf, size_t bufsz, int verbose);
-+
-+/*
-+ * Used by callers that don't know if they're looking at PyFrameObject.
-+ * Checks PC for traceable functions.
-+ */
-+extern	int	pydb_pc_frameinfo(pydb_agent_t *py, uintptr_t pc,
-+    uintptr_t frame_addr, char *fbuf, size_t bufsz);
-+
-+/* Iterator functions */
-+typedef struct pydb_iter pydb_iter_t;
-+
-+extern	pydb_iter_t	*pydb_frame_iter_init(pydb_agent_t *py, uintptr_t addr);
-+extern	pydb_iter_t	*pydb_interp_iter_init(pydb_agent_t *py,
-+    uintptr_t addr);
-+extern	pydb_iter_t	*pydb_thread_iter_init(pydb_agent_t *py,
-+    uintptr_t addr);
-+extern	void		pydb_iter_fini(pydb_iter_t *iter);
-+extern	uintptr_t	pydb_iter_next(pydb_iter_t *iter);
-+
-+#ifdef	__cplusplus
-+}
-+#endif
-+
-+#endif	/* _LIBPYTHON26_DB_H */
-diff -ruN Python-2.6.7-orig/py_db/mapfile-vers Python-2.6.7/py_db/mapfile-vers
---- Python-2.6.7-orig/py_db/mapfile-vers	1970-01-01 00:00:00.000000000 +0000
-+++ Python-2.6.7/py_db/mapfile-vers	2012-02-16 03:13:33.351553918 +0000
-@@ -0,0 +1,40 @@
-+#
-+# CDDL HEADER START
-+#
-+# The contents of this file are subject to the terms of the
-+# Common Development and Distribution License (the "License").
-+# You may not use this file except in compliance with the License.
-+#
-+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+# or http://www.opensolaris.org/os/licensing.
-+# See the License for the specific language governing permissions
-+# and limitations under the License.
-+#
-+# When distributing Covered Code, include this CDDL HEADER in each
-+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+# If applicable, add the following below this CDDL HEADER, with the
-+# fields enclosed by brackets "[]" replaced with your own identifying
-+# information: Portions Copyright [yyyy] [name of copyright owner]
-+#
-+# CDDL HEADER END
-+#
-+
-+#
-+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-+# Use is subject to license terms.
-+#
-+
-+SUNWprivate_1.1 {
-+    global:
-+	pydb_agent_create;
-+	pydb_agent_destroy;
-+	pydb_frame_iter_init;
-+	pydb_get_frameinfo;
-+	pydb_pc_frameinfo;
-+	pydb_interp_iter_init;
-+	pydb_thread_iter_init;
-+	pydb_iter_fini;
-+	pydb_iter_next;
-+    local:
-+	*;
-+};
--- old/build/python26/patches/Python26-23-none-on-connect.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,122 +0,0 @@
-diff -ruN Python-2.6.7-orig/Doc/library/asyncore.rst Python-2.6.7/Doc/library/asyncore.rst
---- Python-2.6.7-orig/Doc/library/asyncore.rst	2010-05-19 14:14:45.000000000 +0000
-+++ Python-2.6.7/Doc/library/asyncore.rst	2012-02-15 20:47:05.176388857 +0000
-@@ -211,10 +211,13 @@
-    .. method:: accept()
- 
-       Accept a connection.  The socket must be bound to an address and listening
--      for connections.  The return value is a pair ``(conn, address)`` where
--      *conn* is a *new* socket object usable to send and receive data on the
--      connection, and *address* is the address bound to the socket on the other
--      end of the connection.
-+      for connections.  The return value can be either ``None`` or a pair
-+      ``(conn, address)`` where *conn* is a *new* socket object usable to send
-+      and receive data on the connection, and *address* is the address bound to
-+      the socket on the other end of the connection.
-+      When ``None`` is returned it means the connection didn't take place, in
-+      which case the server should just ignore this event and keep listening
-+      for further incoming connections.
- 
- 
-    .. method:: close()
-@@ -224,6 +227,12 @@
-       flushed).  Sockets are automatically closed when they are
-       garbage-collected.
- 
-+.. class:: dispatcher_with_send()
-+
-+   A :class:`dispatcher` subclass which adds simple buffered output capability,
-+   useful for simple clients. For more sophisticated usage use
-+   :class:`asynchat.async_chat`.
-+
- .. class:: file_dispatcher()
- 
-    A file_dispatcher takes a file descriptor or file object along with an
-@@ -240,7 +249,7 @@
-    socket for use by the :class:`file_dispatcher` class.  Availability: UNIX.
- 
- 
--.. _asyncore-example:
-+.. _asyncore-example-1:
- 
- asyncore Example basic HTTP client
- ----------------------------------
-@@ -250,7 +259,7 @@
- 
-    import asyncore, socket
- 
--   class http_client(asyncore.dispatcher):
-+   class HTTPClient(asyncore.dispatcher):
- 
-        def __init__(self, host, path):
-            asyncore.dispatcher.__init__(self)
-@@ -274,6 +283,45 @@
-            sent = self.send(self.buffer)
-            self.buffer = self.buffer[sent:]
- 
--   c = http_client('www.python.org', '/')
- 
-+   client = HTTPClient('www.python.org', '/')
-    asyncore.loop()
-+
-+.. _asyncore-example-2:
-+
-+asyncore Example basic echo server
-+----------------------------------
-+
-+Here is abasic echo server that uses the :class:`dispatcher` class to accept
-+connections and dispatches the incoming connections to a handler::
-+
-+    import asyncore
-+    import socket
-+
-+    class EchoHandler(asyncore.dispatcher_with_send):
-+
-+        def handle_read(self):
-+            data = self.recv(8192)
-+            self.send(data)
-+
-+    class EchoServer(asyncore.dispatcher):
-+
-+        def __init__(self, host, port):
-+            asyncore.dispatcher.__init__(self)
-+            self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
-+            self.set_reuse_addr()
-+            self.bind((host, port))
-+            self.listen(5)
-+
-+        def handle_accept(self):
-+            pair = self.accept()
-+            if pair is None:
-+                pass
-+            else:
-+                sock, addr = pair
-+                print 'Incoming connection from %s' % repr(addr)
-+                handler = EchoHandler(sock)
-+
-+    server = EchoServer('localhost', 8080)
-+    asyncore.loop()
-+
-diff -ruN Python-2.6.7-orig/Lib/asyncore.py Python-2.6.7/Lib/asyncore.py
---- Python-2.6.7-orig/Lib/asyncore.py	2010-08-13 01:30:39.000000000 +0000
-+++ Python-2.6.7/Lib/asyncore.py	2012-02-15 20:47:05.175726769 +0000
-@@ -348,12 +348,15 @@
-         # XXX can return either an address pair or None
-         try:
-             conn, addr = self.socket.accept()
--            return conn, addr
--        except socket.error, why:
--            if why.args[0] == EWOULDBLOCK:
--                pass
-+        except TypeError:
-+            return None
-+        except socket.error as why:
-+            if why.args[0] in (EWOULDBLOCK, ECONNABORTED):
-+                return None
-             else:
-                 raise
-+        else:
-+            return conn, addr
- 
-     def send(self, data):
-         try:
--- old/build/python26/patches/Python26-24-makedev.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,43 +0,0 @@
-diff -ruN Python-2.6.7-orig/configure.in Python-2.6.7/configure.in
---- Python-2.6.7-orig/configure.in	2010-05-25 02:27:03.000000000 +0000
-+++ Python-2.6.7/configure.in	2012-02-15 20:53:35.447313987 +0000
-@@ -1358,36 +1358,9 @@
- ])
- AC_MSG_RESULT($was_it_defined)
- 
--# Check whether using makedev requires defining _OSF_SOURCE
--AC_MSG_CHECKING(for makedev)
--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)
--if test "$ac_cv_has_makedev" = "no"; then
--    # we didn't link, try if _OSF_SOURCE will allow us to link
--    AC_TRY_LINK([
--#define _OSF_SOURCE 1
--#include <sys/types.h>
--    ],
--    [ makedev(0, 0) ],
--    ac_cv_has_makedev=yes,
--    ac_cv_has_makedev=no)
--    if test "$ac_cv_has_makedev" = "yes"; then
--        AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
--    fi
--fi
--AC_MSG_RESULT($ac_cv_has_makedev)
--if test "$ac_cv_has_makedev" = "yes"; then
--    AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.])
--fi
-+# Solaris has makedev, and posixmodule already has all the right #include
-+# statements.
-+AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.])
- 
- # Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
- # the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
--- old/build/python26/patches/Python26-25-closerange.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,40 +0,0 @@
-diff -ruN Python-2.6.7-orig/Modules/posixmodule.c Python-2.6.7/Modules/posixmodule.c
---- Python-2.6.7-orig/Modules/posixmodule.c	2010-07-24 10:05:19.000000000 +0000
-+++ Python-2.6.7/Modules/posixmodule.c	2012-02-15 21:00:26.835701885 +0000
-@@ -6376,15 +6376,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];
-+
-+    if (fd >= hi)
-+        return (1);
-+    else if (fd >= lo)
-+        close(fd);
-+
-+    return (0);
-+}
-+
- static PyObject *
- posix_closerange(PyObject *self, PyObject *args)
- {
-     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);
-+
-+    lohi[0] = fd_from;
-+    lohi[1] = fd_to;
-+    fdwalk(close_func, lohi);
-+
-     Py_END_ALLOW_THREADS
-     Py_RETURN_NONE;
- }
--- old/build/python26/patches/Python26-26-pybench.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,46 +0,0 @@
-This updates pybench for Python 2.6 with the fixes found in Python 2.7's
-version.
---- Python-2.6.4/Tools/pybench/pybench.py.orig	Wed Nov  2 17:09:28 2011
-+++ Python-2.6.4/Tools/pybench/pybench.py	Sat Jun 11 08:46:28 2011
-@@ -1,4 +1,4 @@
--#!/usr/bin/python2.6
-+#!/usr/local/bin/python -O
- 
- """ A Python Benchmark Suite
- 
-@@ -230,7 +230,7 @@
-                 raise ValueError('at least one calibration run is required')
-             self.calibration_runs = calibration_runs
-         if timer is not None:
--            timer = timer
-+            self.timer = timer
- 
-         # Init variables
-         self.times = []
-@@ -278,7 +278,7 @@
-             for i in calibration_loops:
-                 pass
-             t = timer() - t
--            prep_times.append(t)
-+            prep_times.append(t / CALIBRATION_LOOPS)
-         min_prep_time = min(prep_times)
-         if _debug:
-             print
-@@ -689,7 +689,7 @@
-                 other_total_avg_time = other_total_avg_time + other_avg_time
-                 if (benchmarks_compatible and
-                     test.compatible(other)):
--                    # Both benchmark and tests are comparible
-+                    # Both benchmark and tests are comparable
-                     min_diff = ((min_time * self.warp) /
-                                 (other_min_time * other.warp) - 1.0)
-                     avg_diff = ((avg_time * self.warp) /
-@@ -703,7 +703,7 @@
-                     else:
-                         avg_diff = '%+5.1f%%' % (avg_diff * PERCENT)
-                 else:
--                    # Benchmark or tests are not comparible
-+                    # Benchmark or tests are not comparable
-                     min_diff, avg_diff = 'n/a', 'n/a'
-                     tests_compatible = 0
-             print '%30s: %5.0fms %5.0fms %7s %5.0fms %5.0fms %7s' % \
--- old/build/python26/patches/Python26-27-sunos11-awareness.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,26 +0,0 @@
-diff -ru Python-2.6.7-orig/configure.in Python-2.6.7/configure.in
---- Python-2.6.7-orig/configure.in	2010-05-25 02:27:03.000000000 +0000
-+++ Python-2.6.7/configure.in	2012-02-16 04:16:13.796197134 +0000
-@@ -372,7 +372,7 @@
-   # except for Solaris 10, where it must not be defined, 
-   # as it implies XPG4.2
-   case $ac_sys_system/$ac_sys_release in
--    SunOS/5.10)
-+    SunOS/5.10|SunOS/5.11)
-       ;;
-     *)
-       AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
-diff -ru Python-2.6.7-orig/Lib/distutils/sysconfig.py Python-2.6.7/Lib/distutils/sysconfig.py
---- Python-2.6.7-orig/Lib/distutils/sysconfig.py	2010-08-03 21:18:06.000000000 +0000
-+++ Python-2.6.7/Lib/distutils/sysconfig.py	2012-02-16 04:19:04.453088064 +0000
-@@ -225,7 +225,9 @@
-         return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
-                             "Makefile")
-     lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
--    return os.path.join(lib_dir, "config", "Makefile")
-+    if sys.maxint == 2147483647L:
-+        return os.path.join(lib_dir, "config", "Makefile")
-+    return os.path.join(lib_dir, "config", "Makefile.64")
- 
- 
- def parse_config_h(fp, g=None):
--- old/build/python26/patches/Python26-28-no-libdl.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,15 +0,0 @@
---- Python-2.6.7/configure.in	Wed Feb 22 18:07:20 2012
-+++ Python-2.6.7/configure.in	Wed Feb 22 18:07:27 2012
-@@ -1931,7 +1931,11 @@
- 
- 
- # checks for libraries
--AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
-+case  $ac_sys_system/$ac_sys_release in
-+  SunOS/5.11) ;;
-+  *) AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
-+  ;;
-+esac
- AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX
- 
- # only check for sem_init if thread support is requested
--- old/build/python26/patches/Python26-29-ATTRIBUTE_FORMAT_PARSETUPLE.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,12 +0,0 @@
---- Python-2.6.7/Include/pyport.h	Sun May  9 15:15:40 2010
-+++ Python-2.6.7/Include/pyport.h.fixed	Tue Aug 13 18:25:28 2013
-@@ -712,7 +707,8 @@
- /*
-  * Add PyArg_ParseTuple format where available.
-  */
--#ifdef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
-+#if HAVE_ATTRIBUTE_FORMAT_PARSETUPLE && (!defined(__GNUC__) || \
-+      (__GNUC__ >= 4 && __GNUC_MINOR__ > 7))
- #define Py_FORMAT_PARSETUPLE(func,p1,p2) __attribute__((format(func,p1,p2)))
- #else
- #define Py_FORMAT_PARSETUPLE(func,p1,p2)
--- old/build/python26/patches/Python26-30-recvfrom-vuln.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,17 +0,0 @@
---- Python-2.6.8/Modules/socketmodule.c Tue Apr 10 11:32:10 2012
-+++ Python-2.6.8-patched/Modules/socketmodule.c Sat Mar  1 19:55:25 2014
-@@ -2627,6 +2627,14 @@
-         recvlen = buflen;
-     }
- 
-+
-+    /* Check if the buffer is large enough */
-+    if (buflen < recvlen) {
-+        PyErr_SetString(PyExc_ValueError,
-+                        "buffer too small for requested bytes");
-+        return NULL;
-+    }
-+
-     readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
-     if (readlen < 0) {
-         /* Return an error */
--- old/build/python26/patches/Python26-31-mknod-64-bit.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,14 +0,0 @@
---- Python-2.6.8/Modules/posixmodule.c.orig  Tue Dec  9 20:39:20 2014
-+++ Python-2.6.8/Modules/posixmodule.c       Tue Dec  9 20:40:10 2014
-@@ -6743,9 +6743,9 @@
- {
-     char *filename;
-     int mode = 0600;
--    int device = 0;
-+    ulong_t device = 0;
-     int res;
--    if (!PyArg_ParseTuple(args, "s|ii:mknod", &filename, &mode, &device))
-+    if (!PyArg_ParseTuple(args, "s|il:mknod", &filename, &mode, &device))
-         return NULL;
-     Py_BEGIN_ALLOW_THREADS
-     res = mknod(filename, mode, device);
--- old/build/python26/patches/Python26-32-readline63.patch	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,18 +0,0 @@
---- Python-2.6.8-orig/Modules/readline.c	Tue Apr 10 15:32:10 2012
-+++ Python-2.6.8/Modules/readline.c	Fri Jul 31 15:19:27 2015
-@@ -841,12 +841,12 @@
-     rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
-     rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
-     /* Set our hook functions */
--    rl_startup_hook = (Function *)on_startup_hook;
-+    rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
--    rl_pre_input_hook = (Function *)on_pre_input_hook;
-+    rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
- #endif
-     /* Set our completion function */
--    rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+    rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
-     /* Set Python word break characters */
-     rl_completer_word_break_characters =
-         strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
--- old/build/python26/patches/series	Mon Jan  9 12:11:38 2017
+++ /dev/null	Mon Jan  9 12:11:37 2017
@@ -1,34 +0,0 @@
-Python26-00-filemagic.patch -p1
-Python26-01-solaris-lib-dirs.patch -p1
-#Python26-02-pycc.patch -p1
-#Python26-03-distutils-pycc.patch -p1
-Python26-04-distutils-log.patch -p1
-Python26-05-isalibs.patch -p1
-Python26-06-write_compiled_module-atomic.patch -p1
-Python26-07-dtrace.patch -p1
-Python26-08-ctypes.patch -p1
-Python26-09-ucred.patch -p1
-Python26-10-gethostname.patch -p1
-Python26-11-dlpi.patch -p1
-Python26-12-encoding-alias.patch -p1
-Python26-13-cflags.patch -p1
-Python26-14-ctypes-util-find-library.patch -p1
-Python26-15-getcwd.patch -p1
-Python26-16-privrbac.patch -p1
-Python26-17-netpacket-packet-h.patch -p1
-Python26-18-readline.patch -p1
-Python26-19-ext-stdio.patch -p1
-Python26-20-py_db.patch -p1
-#Python26-21-getpass.patch -p1 (this was accepted upstream)
-#Python26-22-bindir.patch -p1 (this was accepted upstream)
-Python26-23-none-on-connect.patch -p1
-Python26-24-makedev.patch -p1
-#Python26-24-symbolic.patch -p1 (bad patch, so lose it)
-Python26-25-closerange.patch -p1
-Python26-26-pybench.patch -p1
-Python26-27-sunos11-awareness.patch -p1
-Python26-28-no-libdl.patch -p1
-Python26-29-ATTRIBUTE_FORMAT_PARSETUPLE.patch -p1
-Python26-30-recvfrom-vuln.patch -p1
-Python26-31-mknod-64-bit.patch -p1
-Python26-32-readline63.patch -p1
--- /dev/null	Mon Jan  9 12:11:38 2017
+++ new/build/python27/26-obsolete.p5m	Mon Jan  9 12:11:38 2017
@@ -0,0 +1,5 @@
+set name=pkg.fmri value=runtime/python-26@2.6.8-@PVER@
+set name=pkg.renamed value=true
+set name=pkg.description value="Python 2.6 (obsolete)"
+set name=pkg.summary value="Python 2.6 (obsolete)"
+depend fmri=runtime/python-27 type=require
--- old/build/python27/build.sh	Mon Jan  9 12:11:38 2017
+++ new/build/python27/build.sh	Mon Jan  9 12:11:38 2017
@@ -114,8 +114,7 @@
         logerr "--- Make install failed"
     rm $DESTDIR/usr/bin/amd64/python || logerr "--- cannot remove arch hardlink"
     rm $DESTDIR/usr/lib/python2.7/config/libpython2.7.a || logerr "--- cannot remove static lib"
-    # XXX KEBE SAYS Uncomment me eventually...
-    # (cd $DESTDIR/usr/bin && ln -s python2.7 python) ||  logerr "--- could not setup python softlink"
+    (cd $DESTDIR/usr/bin && ln -s python2.7 python) ||  logerr "--- could not setup python softlink"
     # Copy off _sysconfigdata.py
     sed 's/^/    /g' < $DESTDIR/usr/lib/python2.7/_sysconfigdata.py > \
 	    /tmp/_sysconfigdata-64-$$.py
--- old/build/python27/local.mog	Mon Jan  9 12:11:39 2017
+++ new/build/python27/local.mog	Mon Jan  9 12:11:39 2017
@@ -1,29 +1,10 @@
 <transform file path=license$ -> drop>
 license license license=PSF
 
-# Drop some things for now because they conflict with still-in-use Python 2.6
-<transform file path=usr/bin/2to3 -> drop>
-<transform file path=usr/bin/idle -> drop>
-<transform file path=usr/bin/pydoc -> drop>
-<transform file path=usr/bin/python-config -> drop>
-<transform file path=usr/bin/python2-config -> drop>
-<transform file path=usr/bin/smtpd.py -> drop>
-<transform file path=usr/bin/i386/2to3 -> drop>
-<transform file path=usr/bin/i386/idle -> drop>
-<transform file path=usr/bin/i386/pydoc -> drop>
-<transform link path=usr/bin/i386/python-config -> drop>
-<transform file path=usr/bin/i386/python2-config -> drop>
-<transform file path=usr/bin/i386/smtpd.py -> drop>
-<transform file path=usr/bin/amd64/2to3 -> drop>
-<transform file path=usr/bin/amd64/idle -> drop>
-<transform file path=usr/bin/amd64/pydoc -> drop>
-<transform link path=usr/bin/amd64/python-config -> drop>
-<transform file path=usr/bin/amd64/python2-config -> drop>
-<transform file path=usr/bin/amd64/smtpd.py -> drop>
-<transform link path=usr/share/man/man1/python.1 -> drop>
-
 # Prevents pkgdepend from freaking out.
 
+<transform file path=usr/bin/amd64/smtpd.py -> set pkg.depend.bypass-generate .*>
+<transform file path=usr/bin/i386/smtpd.py -> set pkg.depend.bypass-generate .*>
 <transform file path=usr/lib/python2.7/lib2to3/tests/pytree_idempotency.py -> set pkg.depend.bypass-generate .*>
 <transform file path=usr/lib/python2.7/cProfile.py -> set pkg.depend.bypass-generate .*>
 <transform file path=usr/lib/python2.7/cgi.py -> set pkg.depend.bypass-generate .*>
--- old/build/swig/build.sh	Mon Jan  9 12:11:39 2017
+++ new/build/swig/build.sh	Mon Jan  9 12:11:39 2017
@@ -33,7 +33,7 @@
 SUMMARY="The Simplified Wrapper and Interface Generator (swig)"
 DESC="$SUMMARY"
 
-BUILD_DEPENDS_IPS="runtime/perl runtime/python-26"
+BUILD_DEPENDS_IPS="runtime/perl runtime/python-27"
 
 CONFIGURE_OPTS="--disable-ccache"
 
--- old/lib/config.sh	Mon Jan  9 12:11:39 2017
+++ new/lib/config.sh	Mon Jan  9 12:11:39 2017
@@ -98,7 +98,7 @@
 #############################################################################
 # Python -- NOTE, these can be changed at runtime via set_python_version().
 #############################################################################
-: ${PYTHONVER:=2.6}
+: ${PYTHONVER:=2.7}
 : ${PYTHONPKGVER:=`echo $PYTHONVER | sed 's/\.//g'`}
 PYTHONPATH=/usr
 PYTHON=$PYTHONPATH/bin/python$PYTHONVER
