return 1
fi
isPython=`which python 2>/dev/null`
-if [ -n isPython ]; then
+if [ -n "$isPython" ]; then
# version number is calculated as: <major>*10000+<minor>*100+<release>
# e.g. for Python 2.3.4 it is equal to 20304
ver=`python -V 2>&1`
install_source()
{
-echo "The installation of Python 2.3.4 from sources is not provided! Use native Python."
-return 1
+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.3.4.tar.gz -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
+mv -f _Makefile Makefile
+# vsr: socket module is not compiled on RedHat9 because of absent KERBEROS include/libs flags
+sed -e "s%\[('USE_SSL',1)\]%\[('USE_SSL',1),('OPENSSL_NO_KRB5',None)\]%g" setup.py > _setup.py
+mv -f _setup.py setup.py
+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
+
+#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
+rm -fr ${PRODUCT_WORK}
+print_env
}
install_binary()
{
-echo "The installation of Python 2.3.4 from binaries is not provided! Use native gcc."
-return 1
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/Python-2.3.4.tar.gz -C ${INSTALL_ROOT}
+
+print_env
}
export PROCEDURE=$1;