From 7553e4fed7c28ecb2097165a832562d67f8607ba Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 13 Mar 2006 17:01:51 +0000 Subject: [PATCH] Improve Python installation scripts --- config_files/Python-2.2.1.sh | 22 +++++++++++++++------- config_files/Python-2.3.4.sh | 31 +++++++++++++++++++------------ 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/config_files/Python-2.2.1.sh b/config_files/Python-2.2.1.sh index 2d5d9e2..81697f9 100755 --- a/config_files/Python-2.2.1.sh +++ b/config_files/Python-2.2.1.sh @@ -101,7 +101,7 @@ 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 +sed -e 's%\(^LIBS=.*\)%\1 -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 @@ -115,9 +115,13 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make check_job ${PRODUCT_DIR}/MAKINSTALL.LOG make install cd ${PRODUCT_DIR}/bin -sed -e "s%#\!.*python%#\!/usr/bin/env python%" pydoc > _pydoc -mv -f _pydoc pydoc -chmod a+x pydoc +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} @@ -132,9 +136,13 @@ 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 +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done print_env } diff --git a/config_files/Python-2.3.4.sh b/config_files/Python-2.3.4.sh index b0ac880..e23b836 100755 --- a/config_files/Python-2.3.4.sh +++ b/config_files/Python-2.3.4.sh @@ -99,12 +99,9 @@ cd ${PRODUCT_WORK} check_job ${PRODUCT_DIR}/CONFIGURE.LOG \ ./configure --prefix=${PRODUCT_DIR} --with-threads --with-cxx=`which g++` --enable-shared -# vsr: not compiled on RedHat8.0 without libstdc++.so -sed -e 's%LIBS= -ldl -lpthread -lutil%LIBS= -ldl -lpthread -lutil -lstdc++%g' Makefile > _Makefile +# vsr: force linking to libstdc++.so +sed -e 's%\(^LIBS=.*\)%\1 -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 +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK} @@ -131,10 +132,16 @@ source ${INSTALL_WORK}/$SHRC check_jb tar xfz ${SOURCE_DIR}/Python-2.3.4.tar.gz -C ${INSTALL_ROOT} +(cd ${PRODUCT_DIR}/lib/python2.3/config; ln -fs ../../libpython2.3.so.1.0 libpython2.3.so) + cd ${PRODUCT_DIR}/bin -sed -e "s%#\!.*python%#\!/usr/bin/env python%" pydoc > _pydoc -mv -f _pydoc pydoc -chmod a+x pydoc +for sc in idle pydoc smtpd.py ; do + if [ -e $sc ] ; then + sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done print_env } -- 2.39.2