Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-linux64.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-linux64.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-linux64.sh	(revision 12878)
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.2.tgz
+mv Python-2.7.2/* src
+rm -rf Python-2.7.2
+
+#Configure python
+cd src 
+./configure \
+ --prefix="$ISSM_DIR/externalpackages/python/install" \
+ --enable-shared
+
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install/include
+cp python2.7/* ./
+cd ../lib
+ln -s  libpython2.7.so.1.0 libpython.so
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-lion.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-lion.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-lion.sh	(revision 12878)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.2.tgz
+mv Python-2.7.2/* src
+rm -rf Python-2.7.2
+
+#Configure and compile
+cd src 
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install
+
+#get rid of bin, because it's just a copy of
+#Library/Frameworks/Python.framework/Versions/2.7/bin, and will not reflect
+#new changes being made
+rm -rf bin
+ln -s Library/Frameworks/Python.framework/Headers include
+ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
+ln -s Library/Frameworks/Python.framework/Versions/2.7/bin bin
+
+#Patch pyport.h:
+cd include
+patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-snowleopard.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-snowleopard.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-2.7.2-macosx-snowleopard.sh	(revision 12878)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-2.7.2.tgz Python-2.7.2.tgz
+
+#exports
+export CC
+export MACOSX_DEPLOYMENT_TARGET=10.6
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.2.tgz
+mv Python-2.7.2/* src
+rm -rf Python-2.7.2
+
+#Configure doxygen
+cd src 
+# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
+# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
+./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+
+#make
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install
+ln -s Library/Frameworks/Python.framework/Headers include
+ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
+
+#Patch pyport.h:
+cd include
+patch pyport.h ../patch/pyport.h.patch
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-linux64.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-linux64.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-linux64.sh	(revision 12878)
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure python
+cd src 
+./configure \
+ --prefix="$ISSM_DIR/externalpackages/python/install" \
+ --enable-shared
+
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-lion.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-lion.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-lion.sh	(revision 12878)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure doxygen
+cd src 
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+
+#obsolete? 
+#./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
+
+#make
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-snowleopard.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-snowleopard.sh	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/install-3.2.2-macosx-snowleopard.sh	(revision 12878)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+export MACOSX_DEPLOYMENT_TARGET=10.6
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure doxygen
+cd src 
+# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
+# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+
+#make
+if [ -z $1 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-linux64-astrid.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-linux64-astrid.sh	(revision 12258)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#!/bin/bash
-#wget http://python.org/ftp/python/version/Python-version.tgz
-
-#version=3.2.2
-version=2.7.2
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-$version
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
-
-#exports
-export CC
-
-#Untar and move python into install directory
-tar -zxvf  Python-$version.tgz
-mv Python-$version/* src
-rm -rf Python-$version
-
-#Configure doxygen
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/python/install" 
-
-if [ -z $1 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-#Some modifications to be done in case version is 3.2: 
-if [[ $version == "3.2.2" ]]; then 
-	cd install/bin
-	ln -s python3.2 python 
-	cd ../
-	ln -s Python.framework/Versions/3.2/include/python3.2m include
-	ln -s Python.framework/Versions/3.2/lib/ lib
-
-
-fi
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-macosx-lion.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-macosx-lion.sh	(revision 12258)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#!/bin/bash
-#wget http://python.org/ftp/python/version/Python-version.tgz
-
-#version=3.2.2
-version=2.7.2
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-$version
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
-
-#exports
-export CC
-
-#Untar and move python into install directory
-tar -zxvf  Python-$version.tgz
-mv Python-$version/* src
-rm -rf Python-$version
-
-#Configure doxygen
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
-if [ -z $1 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-#Some modifications to be done in case version is 3.2: 
-if [[ $version == "3.2.2" ]]; then 
-	cd install/bin
-	ln -s python3.2 python 
-	cd ../
-	ln -s Python.framework/Versions/3.2/include/python3.2m include
-	ln -s Python.framework/Versions/3.2/lib/ lib
-
-
-fi
Index: issm/branches/trunk-jpl-damage/externalpackages/python/install-macosx-snowleopard.sh
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/install-macosx-snowleopard.sh	(revision 12258)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#!/bin/bash
-#wget http://python.org/ftp/python/version/Python-version.tgz
-
-#version=3.2.2
-version=2.7.2
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-$version
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
-
-#exports
-export CC
-export MACOSX_DEPLOYMENT_TARGET=10.6
-
-#Untar and move python into install directory
-tar -zxvf  Python-$version.tgz
-mv Python-$version/* src
-rm -rf Python-$version
-
-#Configure doxygen
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install" --enable-universalsdk --with-universal-archs="32-bit"
-if [ -z $1 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-#Some modifications to be done in case version is 3.2: 
-if [[ $version == "3.2.2" ]]; then 
-	cd install/bin
-	ln -s python3.2 python 
-	cd ../
-	ln -s Python.framework/Versions/3.2/include/python3.2m include
-	ln -s Python.framework/Versions/3.2/lib/ lib
-fi
Index: issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch	(revision 12878)
@@ -0,0 +1,22 @@
+680a681
+> #ifdef isalnum
+682a684,685
+> #endif
+> #ifdef isalpha
+684a688,689
+> #endif
+> #ifdef islower
+686a692,693
+> #endif
+> #ifdef isspace
+688a696,697
+> #endif
+> #ifdef isupper
+690a700,701
+> #endif
+> #ifdef tolower
+692a704,705
+> #endif
+> #ifdef toupper
+695a709
+> #endif
Index: issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch.bugreport
===================================================================
--- issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch.bugreport	(revision 12878)
+++ issm/branches/trunk-jpl-damage/externalpackages/python/patches/pyport.h.patch.bugreport	(revision 12878)
@@ -0,0 +1,1 @@
+http://bugs.python.org/issue10910
