From: vsr Date: Mon, 24 Oct 2005 08:15:13 +0000 (+0000) Subject: Python 2.3.4 installation script X-Git-Tag: V_3_1_0a2~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e79162967c0e2ac042ae336b6d130c888d94604f;p=tools%2Finstall.git Python 2.3.4 installation script --- diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh index 3d5b8b8..3f13dee 100755 --- a/config_files/Python-2.3.4.sh +++ b/config_files/Python-2.3.4.sh @@ -85,14 +85,43 @@ return $? 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 < ${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; diff --git a/config_files/Python-2.3.5.sh b/config_files/Python-2.3.5.sh deleted file mode 100755 index 549c440..0000000 --- a/config_files/Python-2.3.5.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh - -check_version() -{ -if [ -z "$PYTHONHOME" ]; then - return 1 -fi -isPython=`which python 2>/dev/null` -if [ -n "$isPython" ]; then - # version number is calculated as: *10000+*100+ - # for Python 2.3.5 it is equal to 20305 - ver=`python -V 2>&1` - ver=`echo $ver | awk '{print $2}' | awk -F. '{v1=0;v2=0;v3=0;if(NF>0)v1=$1;if(NF>1)v2=$2;if(NF>2)v3=$3;print v1*10000+v2*100+v3}'` - if [ $ver -eq 20305 ] ; then - return 0 - fi -fi -return 1 -} - -print_env() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <, and - # and numbers are checked strickly, but number can be larger than required one - # version number is calculated as: *10000+*100+ - # for Python 2.3.5 it is equal to 20305 - ver=`python -V 2>&1` - maj_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>0) print $1; else print 0}'` - min_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>1) print $2; else print 0}'` - rel_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>2) print $3; else print 0}'` - let ver=$maj_ver*10000+$min_ver*100+$rel_ver - if [ $ver -ge 20305 ] ; then - tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}"; - path=`sort_path ${tmp}` - tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}"; - pythonpath=`sort_path ${tmp}` - cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <