X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=config_files%2FPython-2.2.1.sh;h=2d5d9e2226dfc118e1110137c06bc34f5459e9c8;hb=cd1225c9bd07dcd681b263e93df98b67b7ec4aef;hp=cf169dfed61e917259fed487d3ada0acae80ad42;hpb=594a1dbb635445c29d0c6e957153e93e86b2911e;p=tools%2Finstall.git diff --git a/config_files/Python-2.2.1.sh b/config_files/Python-2.2.1.sh index cf169df..2d5d9e2 100755 --- a/config_files/Python-2.2.1.sh +++ b/config_files/Python-2.2.1.sh @@ -6,7 +6,7 @@ if [ -z "$PYTHONHOME" ]; then return 1 fi isPython=`which python 2>/dev/null` -if [ -n isPython ]; then +if [ -n "$isPython" ]; then # version number is calculated as: *10000+*100+ # e.g. for Python 2.2.1 it is equal to 20201 ver=`python -V 2>&1` @@ -23,10 +23,11 @@ print_env() cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <&1`" == "Python 2.2.1" ] ; then tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}"; path=`sort_path ${tmp}` - tmp="\${PYTHONHOME}/lib/python2.2 ${pythonhome}/lib/python2.2 \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; - ld_library_path=`sort_path ${tmp}` - tmp="\${PYTHONHOME}/lib/python2.2 ${pythonhome}/lib/python2.2 \${PYTHONPATH} ${PYTHONPATH}"; + tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}"; pythonpath=`sort_path ${tmp}` + tmp="\${PYTHONHOME}/lib ${pythonhome}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}"; + ld_library_path=`sort_path ${tmp}` cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < Makefile_new -mv -f Makefile_new Makefile +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 < _pydoc +mv -f _pydoc pydoc +chmod a+x pydoc + +#du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log +cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} print_env } @@ -120,6 +131,11 @@ source ${INSTALL_WORK}/$SHRC check_jb tar xfz ${SOURCE_DIR}/Python-2.2.1.tar.gz -C ${INSTALL_ROOT} +cd ${PRODUCT_DIR}/bin +sed -e "s%#\!.*python%#\!/usr/bin/env python%" pydoc > _pydoc +mv -f _pydoc pydoc +chmod a+x pydoc + print_env } @@ -133,4 +149,4 @@ 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 +${PROCEDURE}