--- /dev/null
+#!/bin/sh
+
+check_version()
+{
+if [ -z "$PYTHONHOME" ]; then
+ return 1
+fi
+isPython=`which python 2>/dev/null`
+if [ -n isPython ]; then
+ ver=`python -V 2>&1`
+ if [ "$ver" = "Python 2.2.1" ] ; then
+ return 0
+ fi
+fi
+return 1
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
+export PYTHONPATH=\${PYTHONHOME}/lib/python2.2:\${PYTHONPATH}
+export PATH=\${PYTHONHOME}/bin:\${PATH}
+export LD_LIBRARY_PATH=\${PYTHONHOME}/lib/python2.2:\${LD_LIBRARY_PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+pythonhome="`find_in_path python ${PATH}`"
+if [ -z "${pythonhome}" ] ; then
+ pythonhome="`find_in_path python /usr/bin`"
+fi
+if [ -n "${pythonhome}" ] ; then
+ pythonhome=`cd ${pythonhome}/..; pwd`
+ if [ "`${pythonhome}/bin/python -V 2>&1`" == "Python 2.2.1" ] ; then
+ tmp="\${PYTHONHOME}/lib/python2.2 ${pythonhome}/lib/python2.2 \${PYTHONPATH} ${PYTHONPATH}";
+ pythonpath=`sort_path ${tmp}`
+ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONHOME=${pythonhome}
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
+export PYTHONPATH=${pythonpath}
+##
+EOF
+ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+ return 0
+ fi
+fi
+return 1
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/Python-2.2.1.tgz -C ${INSTALL_WORK}
+cd ${PRODUCT_WORK}
+
+check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
+ ./configure --prefix=${PRODUCT_DIR} --with-threads --with-cxx=`which g++`
+# vsr: not compiled on RedHat8.0 without libstdc++.so
+sed -e 's%LIBS= -ldl -lpthread -lutil%LIBS= -ldl -lpthread -lutil -lstdc++%g' Makefile > Makefile_new
+mv -f Makefile_new Makefile
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
+used gcc=$GCC
+EOF
+
+check_job ${PRODUCT_DIR}/MAKE.LOG make
+check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install
+
+rm -fr ${PRODUCT_WORK}
+print_env
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/Python-2.2.1.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="python" ; fi
+export PRODUCT="Python-2.2.1"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+${PROCEDURE}
\ No newline at end of file