From: maintenance team Date: Mon, 9 Nov 2009 09:18:57 +0000 (+0000) Subject: Replacing Python 2.5.4 by 2.4.4. Removing numpy 1.3.0 and adding Numeric 24.2 X-Git-Tag: V5_1_3~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bc205d9d5057246409533b690b0517b8ac76a98;p=tools%2Finstall.git Replacing Python 2.5.4 by 2.4.4. Removing numpy 1.3.0 and adding Numeric 24.2 --- diff --git a/config_files/Numeric-24.2.sh b/config_files/Numeric-24.2.sh new file mode 100755 index 0000000..610bbd2 --- /dev/null +++ b/config_files/Numeric-24.2.sh @@ -0,0 +1,166 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : Numeric-24.2.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2008 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +check_version() +{ +ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null` +if [ "$ver" == "24.2" ]; then + return 0 +fi +return 1 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < _setup.py + mv _setup.py setup.py + fi + if [ "$f77blas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('f77blas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$cblas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('cblas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$atlas_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('atlas', \)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + if [ "$g2c_nf" -eq "1" ] ; then + sed -e "s%\(^libraries_list = \[.*\)\('g2c'\)\(.*\)$%\1\3%g" setup.py > _setup.py + mv _setup.py setup.py + fi + sed -e "s%^use_dotblas = 1%use_dotblas = 0%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'blas_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'f2c_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'zlapack_lite.c'),\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + sed -e "s%#\(os.path.join('Src', 'dlapack_lite.c')\)%\1%g" setup.py > _setup.py + mv _setup.py setup.py + chmod a+x setup.py +fi + +check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR} + +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} +fi + +# to generate environment scripts +try_preinstalled +} + +install_binary() +{ +make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +# create a product directory +test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} + +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INST_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; +test $# == 10 && shift && SINGLE_DIR=$9 +export PRODUCT="Numeric-24.2" +export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC +source ./common.sh +$PROCEDURE diff --git a/config_files/Python-2.4.4.sh b/config_files/Python-2.4.4.sh new file mode 100755 index 0000000..55294ea --- /dev/null +++ b/config_files/Python-2.4.4.sh @@ -0,0 +1,182 @@ +#!/bin/bash -noprofile + +#################################################################################### +# File : Python-2.5.4.sh +# Created : Thu Dec 18 12:01:00 2002 +# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) +# Project : SALOME +# Module : Installation Wizard +# Copyright : 2002-2008 CEA +# +# This script is the part of the SALOME installation procedure. +# +#################################################################################### + +PY_VERSION=2.4.4 +PY_XVERSION=`echo ${PY_VERSION} | 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}'` +PY_LIBVERSION=`echo ${PY_VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'` + +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+ + 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 ${PY_XVERSION} ] ; then + return 0 + fi +fi +return 1 +} + +print_env_bin() +{ +cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <& /dev/null ; \ +# autoconf >& /dev/null ; \ +# aclocal >& /dev/null ; \ +# autoconf >& /dev/null ) +# fi +#fi + +# to generate environment scripts +try_preinstalled +} + +install_source_and_build() +{ +# install sources +install_source + +# build sources +test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} +cd ${PRODUCT_SRC_DIR} + +export PYTHON_ARCHIVE_PREFIX="" +PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared --without-test --with-libs=-lstdc++" +### --with-pydebug ### (for debug) + +if test `uname -m` = "x86_64" ; then + PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64" +fi + +check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS + +GCC=`which gcc` +cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$sc" + mv -f _"$sc" "$sc" + chmod a+x "$sc" + fi +done + +cd ${PRODUCT_DIR}; + +# remove sources and temporary files after building +if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then + test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} +fi + +# to generate environment scripts +try_preinstalled +} + +install_binary() +{ +make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} +source ${INSTALL_WORK}/$SHRC + +# create a product directory +test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} + +check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} + +(cd ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config; ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so) + +cd ${PRODUCT_DIR}/bin +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 + +# to generate environment scripts +try_preinstalled +} + +export PROCEDURE=$1; +export INSTALL_WORK=$2; +export SOURCE_DIR=$3; +export INST_ROOT=$4; +export PRODUCT_SEQUENCE=$5; +export PRODUCT_TYPE=$6; +export INSTALL_PRODUCTS=$7; +shift +REMOVE_SRC_TMP=$8; +test $# == 10 && shift && SINGLE_DIR=$9 +export PRODUCT="Python-${PY_VERSION}" +export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} +export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} +export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC +source ./common.sh +${PROCEDURE} diff --git a/config_files/Python-2.5.4.sh b/config_files/Python-2.5.4.sh deleted file mode 100755 index 42bde14..0000000 --- a/config_files/Python-2.5.4.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : Python-2.5.4.sh -# Created : Thu Dec 18 12:01:00 2002 -# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) -# Project : SALOME -# Module : Installation Wizard -# Copyright : 2002-2008 CEA -# -# This script is the part of the SALOME installation procedure. -# -#################################################################################### - -PY_VERSION=2.5.4 -PY_XVERSION=`echo ${PY_VERSION} | 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}'` -PY_LIBVERSION=`echo ${PY_VERSION} | awk -F. '{printf("%d.%d",$1,$2)}'` - -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+ - 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 ${PY_XVERSION} ] ; then - return 0 - fi -fi -return 1 -} - -print_env_bin() -{ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <& /dev/null ; \ -# autoconf >& /dev/null ; \ -# aclocal >& /dev/null ; \ -# autoconf >& /dev/null ) -# fi -#fi - -# to generate environment scripts -try_preinstalled -} - -install_source_and_build() -{ -# install sources -install_source - -# build sources -test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} -cd ${PRODUCT_SRC_DIR} - -export PYTHON_ARCHIVE_PREFIX="" -PYTHON_CONFIGURE_OPTIONS="--with-threads --with-cxx=`which g++` --enable-shared --without-test --with-libs=-lstdc++" -### --with-pydebug ### (for debug) - -if test `uname -m` = "x86_64" ; then - PYTHON_CONFIGURE_OPTIONS="${PYTHON_CONFIGURE_OPTIONS} CFLAGS=-m64 CXXFLAGS=-m64" -fi - -check_job ${PRODUCT_DIR}/CONFIGURE.LOG ./configure --prefix=${PRODUCT_DIR} $PYTHON_CONFIGURE_OPTIONS - -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG < _"$sc" - mv -f _"$sc" "$sc" - chmod a+x "$sc" - fi -done - -cd ${PRODUCT_DIR}; - -# remove sources and temporary files after building -if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then - test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR} -fi - -# to generate environment scripts -try_preinstalled -} - -install_binary() -{ -make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} -source ${INSTALL_WORK}/$SHRC - -# create a product directory -test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} - -check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR} - -(cd ${PRODUCT_DIR}/lib/python${PY_LIBVERSION}/config; ln -fs ../../libpython${PY_LIBVERSION}.so.1.0 libpython${PY_LIBVERSION}.so) - -cd ${PRODUCT_DIR}/bin -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 - -# to generate environment scripts -try_preinstalled -} - -export PROCEDURE=$1; -export INSTALL_WORK=$2; -export SOURCE_DIR=$3; -export INST_ROOT=$4; -export PRODUCT_SEQUENCE=$5; -export PRODUCT_TYPE=$6; -export INSTALL_PRODUCTS=$7; -shift -REMOVE_SRC_TMP=$8; -test $# == 10 && shift && SINGLE_DIR=$9 -export PRODUCT="Python-${PY_VERSION}" -export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}} -export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT} -export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC -source ./common.sh -${PROCEDURE} diff --git a/config_files/numpy-1.3.0.sh b/config_files/numpy-1.3.0.sh deleted file mode 100755 index 624a3e7..0000000 --- a/config_files/numpy-1.3.0.sh +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/bash -noprofile - -#################################################################################### -# File : numpy-1.3.0.sh -# Created : Thu Dec 18 12:01:00 2002 -# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) -# Project : SALOME -# Module : Installation Wizard -# Copyright : 2002-2008 CEA -# -# This script is the part of the SALOME installation procedure. -# -#################################################################################### - -check_version(){ -# It is not necessary to check version! -return 0 -} - -print_env_bin(){ -cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh < /dev/null - if [ $? == 0 ] ; then is_debian31=1 ; fi -fi - -if [ $is_debian31 == 1 ] ; then -export LAPACKSUFF="3.1.1" -else -export LAPACKSUFF="3.2" -fi - -export LD_LIBRARY_PATH=${PRODUCT_SRC_DIR}/lapack-${LAPACKSUFF}_SRC:${LD_LIBRARY_PATH} - -check_jb tar xfz ${SOURCE_DIR}/lapack-${LAPACKSUFF}.tar.gz -C ${PRODUCT_SRC_DIR} - - -check_jb tar xfz ${SOURCE_DIR}/numpy-1.3.0.tar.gz -C ${PRODUCT_SRC_DIR} - -# to generate environment scripts -try_preinstalled -} - -install_source_and_build() -{ -# install sources -install_source - -# build sources -test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR} - -# install -GCC=`which gcc` -cat >> ${PRODUCT_DIR}/MAKE.LOG <