]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
- PAL6777
authorvsr <vsr@opencascade.com>
Thu, 2 Jun 2005 08:58:11 +0000 (08:58 +0000)
committervsr <vsr@opencascade.com>
Thu, 2 Jun 2005 08:58:11 +0000 (08:58 +0000)
- verify Python version

20 files changed:
config_files/COMPONENT_BIN.sh
config_files/GEOM_BIN.sh
config_files/GHS3DPLUGIN_BIN.sh
config_files/HELLO_BIN.sh
config_files/HappyDoc-r2_1.sh
config_files/KERNEL_BIN.sh
config_files/MED_BIN.sh
config_files/NETGENPLUGIN_BIN.sh
config_files/Numeric-22.0.sh
config_files/PYCALCULATOR_BIN.sh
config_files/PYHELLO_BIN.sh
config_files/PyQt-3.13.sh
config_files/PyQt-3.3.2.sh
config_files/Python-2.2.1.sh
config_files/SMESH_BIN.sh
config_files/SUPERV_BIN.sh
config_files/VISU_BIN.sh
config_files/VTK-4.2.2.sh
config_files/sip-3.3.2.sh
config_files/sip-4.1.sh

index 6e8ebbe7cd07090afa789f03be0b3bb51278fdcf..53d6c7b0c4e85fb0afa087a7479600f8bec604d4 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export COMPONENT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${COMPONENT_ROOT_DIR}/lib/salome:\${COMPONENT_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export COMPONENT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${COMPONENT_ROOT_DIR}/lib/salome:\${COMPONENT_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index e6ad60df72df5cadfc39c48986d1a3e106ad6aeb..5bb24c13542003e16a3c662524b88e511cc03208 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GEOM_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${GEOM_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${GEOM_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${GEOM_ROOT_DIR}/lib/salome:\${GEOM_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GEOM_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${GEOM_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${GEOM_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${GEOM_ROOT_DIR}/lib/salome:\${GEOM_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 83a11118ef77f0c0777d4d58109e9958891c74ad..a809d63eae987e27fbe4e16fc69dd91b322e983a 100755 (executable)
@@ -18,6 +18,12 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GHS3DPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export LD_LIBRARY_PATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${GHS3DPLUGIN_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -31,6 +37,12 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GHS3DPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export LD_LIBRARY_PATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${GHS3DPLUGIN_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index ddc1c94bb5016cf3fe0a92a4b233397d2feed7d9..8d9c9b3a5473fad03820576d6a0ba895f29705d1 100755 (executable)
@@ -9,6 +9,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export HELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${HELLO_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${HELLO_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${HELLO_ROOT_DIR}/bin/salome:\${HELLO_ROOT_DIR}/lib/salome:\${HELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -22,6 +29,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export HELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${HELLO_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${HELLO_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${HELLO_ROOT_DIR}/bin/salome:\${HELLO_ROOT_DIR}/lib/salome:\${HELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index c0bed7c7b049791f313635dc4803c1cd189e4395..cfa7513d23141d8d7a391baa3523ebfdb9d8b624 100755 (executable)
@@ -17,7 +17,7 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
-export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python2.2/site-packages:\${PYTHONPATH}
+export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -73,7 +73,7 @@ check_jb tar xfz ${SOURCE_DIR}/HappyDoc_r2_1.tar.gz -C ${INSTALL_WORK}
 cd ${PRODUCT_WORK}
 makedir ${PRODUCT_DIR}
 check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR}
-#file_pth=${PRODUCT_DIR}/lib/python2.2/site-packages/happydoclib.pth
+#file_pth=${PRODUCT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/happydoclib.pth
 #if [ ! -f ${file_pth} ] ; then
 #    touch ${file_pth}
 #    cat > ${file_pth} <<EOF 
index 3b679f2c9e2b7c87b2761f6d1782883be43aa5f2..b4f674b466508e981f6f0d87cdac5f427ee298a7 100755 (executable)
@@ -21,7 +21,7 @@ if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
   if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
     export PATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PATH}
     export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-    export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
+    export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
   fi
 fi
 ##
@@ -41,7 +41,7 @@ if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
   if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
     export PATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PATH}
     export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-    export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
+    export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
   fi
 fi
 ##
index 1f177b7e187c858e6fb40efe2fd24f385107a189..cc6cf72c35c67918a45f34e0fb007ae4abf3ccbe 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export MED_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${MED_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${MED_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${MED_ROOT_DIR}/lib/salome:\${MED_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export MED_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${MED_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${MED_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${MED_ROOT_DIR}/lib/salome:\${MED_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index a885748878acece2af1d36a68def209c4c577de6..ad13ad931983b6087d6e2782d5de51e5b803a03c 100755 (executable)
@@ -18,6 +18,12 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export NETGENPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export LD_LIBRARY_PATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${NETGENPLUGIN_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -31,6 +37,12 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export NETGENPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export LD_LIBRARY_PATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${NETGENPLUGIN_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 10e14baf35a254c0776554ad8737a6bcec1a602a..c9850350685e5372f9b83957d872931006e83ebb 100755 (executable)
@@ -1,12 +1,9 @@
 #!/bin/sh
 
 check_version(){
-if [ -d "${PYTHONHOME}/lib/python2.2/site-packages/Numeric" ]; then
-   check_lib_version _numpy.so ${PYTHONHOME}/lib/python2.2/site-packages/Numeric
-   if [ "$?" -eq "0" ]; then
-      #echo "The product ${PRODUCT} has been already installed on yours system"
-      return 0
-   fi
+ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null`
+if [ "$ver" == "22.0" ]; then
+   return 0
 fi
 return 1
 }
@@ -14,7 +11,7 @@ return 1
 print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
-export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python2.2/site-packages/Numeric:\${PYTHONPATH}
+export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages/Numeric:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -23,17 +20,9 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 
 # looks for the native product and collects it's environment (used by make_env())
 try_native(){
-cat > ${INSTALL_WORK}/try_native.py <<EOF 
-import sys
-try :
-    import Numeric
-    sys.exit(0)    
-except ImportError, r :
-    sys.exit(1)
-EOF
-python ${INSTALL_WORK}/try_native.py
+check_version
 if [ $? -eq 0 ] ; then
-    pythonpath="`find_in_path _numpy.so ${PYTHONPATH}`"
+    pythonpath="`find_in_path Numeric.py ${PYTHONPATH}`"
     tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";  
     pythonpath=`sort_path ${tmp}`
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
@@ -42,10 +31,8 @@ export PYTHONPATH=${pythonpath}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
-    rm -f ${INSTALL_WORK}/try_native.py
     return 0
 fi
-rm -f ${INSTALL_WORK}/try_native.py
 return 1
 }
 
index 05b3e84011f718895706cd6fb4c101dc978b111a..923272602587ecf21817876774d4957654b40042 100755 (executable)
@@ -17,6 +17,12 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +36,12 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 67a949c276fda25e52d90f260b534e47f08e8502..f20a9e3515f437495626570e868db15691446968 100755 (executable)
@@ -9,6 +9,12 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PYHELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -22,6 +28,12 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYHELLO_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PATH}
+    export PYTHONPATH=\${PYHELLO_ROOT_DIR}/bin/salome:\${PYHELLO_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index ab9f7fc309cb7c76f27d2157cfb039fdda72d8a2..27d2b21efda6c32f68859ebcdcb4c2063e9d94fb 100755 (executable)
@@ -18,8 +18,8 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export PYQTDIR=\${INSTALL_ROOT}/${PRODUCT}
 export PYQT_SIPS=\${PYQTDIR}/sip
 export PATH=\${PYQTDIR}:\$PATH 
-export PYTHONPATH=\${PYQTDIR}:\${PYTHONPATH}
 export LD_LIBRARY_PATH=\${PYQTDIR}:\$LD_LIBRARY_PATH 
+export PYTHONPATH=\${PYQTDIR}:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
index 266650088a05f1b808f9b8018dd9b6548d8f1124..7de10c99112caff906ac5d601004cfefa85a7774 100755 (executable)
@@ -17,9 +17,9 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYQTDIR=\${INSTALL_ROOT}/${PRODUCT}
 export PYQT_SIPS=\${PYQTDIR}/sip
-export PYTHONPATH=\${PYQTDIR}:\${PYQTDIR}/qt:\${PYQTDIR}/qtgl:\${PYQTDIR}/qttable:\${PYQTDIR}/qtxml:\${PYTHONPATH}
 export PATH=\${PYQTDIR}:\$PATH 
 export LD_LIBRARY_PATH=\${PYQTDIR}:\$LD_LIBRARY_PATH 
+export PYTHONPATH=\${PYQTDIR}:\${PYQTDIR}/qt:\${PYQTDIR}/qtgl:\${PYQTDIR}/qttable:\${PYQTDIR}/qtxml:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -28,9 +28,9 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 
 # looks for the native product and collects it's environment (used by make_env())
 try_native(){
-pyqtdir="`find_in_path sip ${PATH}`"
+pyqtdir="`find_in_path pyuic ${PATH}`"
 if [ -z "${pyqtdir}" ] ; then
-    pyqtdir="`find_in_path sip /usr/bin`"
+    pyqtdir="`find_in_path pyuic /usr/bin`"
 fi
 if [ -n "${pyqtdir}" ] ; then
     pyqt_sips=${pyqtdir}/sip
@@ -40,9 +40,10 @@ if [ -n "${pyqtdir}" ] ; then
            return 1
        fi
     fi
+    python_version="`python -c 'import sys; print sys.version[:3]'`"
     pythonpath="`find_in_path libsip.so.9.1.0 ${PYTHONPATH}`"
     if [ -z "${pythonpath}" ] ; then
-       pythonpath="`find_in_path libsip.so.9.1.0 /usr/lib/python2.2/site-packages`"
+       pythonpath="`find_in_path libsip.so.9.1.0 /usr/lib/python${python_version}/site-packages`"
     fi
     if [ -n "${pythonpath}" ] ; then
        tmp="${pyqtdir} ${pyqtdir} \${PATH} ${PATH}";  
index 2055956e0adab1508005ca7f07ba8a076d4dff73..138125e56a9b378e46e745cf083bc36d80dc0973 100755 (executable)
@@ -23,10 +23,10 @@ print_env()
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
-export PYTHONPATH=\${PYTHONHOME}/lib/python2.2:\${PYTHONPATH}
 export PATH=\${PYTHONHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONHOME}/lib/python2.2:\${LD_LIBRARY_PATH}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -54,17 +54,15 @@ if [ -n "${pythonhome}" ] ; then
 #   if [ "`${pythonhome}/bin/python -V 2>&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}`
        cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYTHONHOME=${pythonhome}
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
-export PYTHONPATH=${pythonpath}
 export PATH=${path}
-export LD_LIBRARY_PATH=${ld_library_path}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=${pythonpath}
 ##
 EOF
        make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 87d19e0043c264adb54a2a47c55740ccc46661da..39db229d1591134b36d823bb291311a0ae9b7ff7 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export SMESH_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${SMESH_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${SMESH_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${SMESH_ROOT_DIR}/lib/salome:\${SMESH_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export SMESH_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${SMESH_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${SMESH_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${SMESH_ROOT_DIR}/lib/salome:\${SMESH_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 533dfb72067fb6afbbc0ed9469cd5f8a364d869e..3e41f681d3d28a14383e101e96545fb72df8846c 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export SUPERV_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${SUPERV_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${SUPERV_ROOT_DIR}/lib/salome:\${SUPERV_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export SUPERV_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${SUPERV_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${SUPERV_ROOT_DIR}/lib/salome:\${SUPERV_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index c72c20edda07fd8a10c26909f018721fda188cd8..54d0e48ed94c3a001268625df9953e04e3561804 100755 (executable)
@@ -17,6 +17,13 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export VISU_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${VISU_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${VISU_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${VISU_ROOT_DIR}/lib/salome:\${VISU_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -30,6 +37,13 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export VISU_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+  if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+    export PATH=\${VISU_ROOT_DIR}/bin/salome:\${PATH}
+    export LD_LIBRARY_PATH=\${VISU_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+    export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${VISU_ROOT_DIR}/lib/salome:\${VISU_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+  fi
+fi
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 23d077ac5e713df0c665d052bc11565342c4951a..558939909594c4ab16c5f2bd466adcf6a30ac1ae 100755 (executable)
@@ -21,7 +21,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export VTKHOME=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${VTKHOME}/bin:\${PATH}
 export LD_LIBRARY_PATH=\${VTKHOME}/lib/vtk:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python2.2/site-packages/vtk_python:\${PYTHONPATH}
+export PYTHONPATH=\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python\${PYTHON_VERSION}/site-packages/vtk_python:\${PYTHONPATH}
 export TCLLIBPATH="\${VTKHOME}/lib/vtk/tcl \${TCLLIBPATH}"
 ##
 EOF
@@ -33,11 +33,12 @@ make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
 try_native(){
 check_version
 if [ $? -eq 0 ] ; then
+    python_version="`python -c 'import sys; print sys.version[:3]'`"
     tmp="\${VTKHOME}/bin ${VTKHOME}/bin \${PATH} ${PATH}";  
     path=`sort_path ${tmp}`
     tmp="\${VTKHOME}/lib/vtk ${VTKHOME}/lib/vtk \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";  
     ld_library_path=`sort_path ${tmp}`
-    tmp="\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python2.2/site-packages/vtk_python ${VTKHOME}/lib/vtk:${VTKHOME}/lib/python2.2/site-packages/vtk_python \${PYTHONPATH} ${PYTHONPATH}";  
+    tmp="\${VTKHOME}/lib/vtk:\${VTKHOME}/lib/python${PYTHON_VERSION}/site-packages/vtk_python ${VTKHOME}/lib/vtk:${VTKHOME}/lib/python${python_version}/site-packages/vtk_python \${PYTHONPATH} ${PYTHONPATH}";  
     python_path=`sort_path ${tmp}`
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
@@ -77,6 +78,10 @@ check_job ${PRODUCT_DIR}/MAKEcmake.LOG make
 check_jb tar xfz ${SOURCE_DIR}/VTK-4.2-LatestRelease.tar.gz -C ${INSTALL_WORK}
 cd ${PRODUCT_WORK}
 
+# get Python and tcl/tk version
+python_version="`python -c 'import sys; print sys.version[:3]'`"
+tcl_version="`find ${TCLHOME}/lib -name 'libtcl*.so' | awk '/libtcl[0-9.]+.so/ { print $0}' | sed -e 's%^.*libtcl\([0-9\.]*\)\.so%\1%'`"
+    
 VTK_CMAKE_OPTIONS=""
 ### common VTK settings
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DBUILD_SHARED_LIBS:BOOL=ON"
@@ -90,18 +95,18 @@ VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_PATENTED:BOOL=OFF"
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_USE_RENDERING:BOOL=ON"
 ### Wrap Python settings
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_PYTHON:BOOL=ON"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_EXECUTABLE:STRING=${PYTHONHOME}/bin/python2.2"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONHOME}/include/python2.2"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONHOME}/lib/python2.2/config/libpython2.2.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_EXECUTABLE:STRING=${PYTHONHOME}/bin/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_INCLUDE_PATH:STRING=${PYTHONHOME}/include/python${python_version}"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DPYTHON_LIBRARY:STRING=${PYTHONHOME}/lib/python${python_version}/config/libpython${python_version}.a"
 ### Wrap Tcl settings
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DVTK_WRAP_TCL:BOOL=ON"
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${TCLHOME}/lib/libtcl.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtclstub.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_LIBRARY:STRING=${TCLHOME}/lib/libtcl${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtclstub${tcl_version}.a"
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTCL_TCLSH:STRING=${TCLHOME}/bin/tclsh"
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_INCLUDE_PATH:STRING=${TCLHOME}/include"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${TCLHOME}/lib/libtk.so"
-VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtkstub.a"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_LIBRARY:STRING=${TCLHOME}/lib/libtk${tcl_version}.so"
+VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_STUB_LIBRARY:STRING=${TCLHOME}/lib/libtkstub${tcl_version}.a"
 VTK_CMAKE_OPTIONS=$VTK_CMAKE_OPTIONS" -DTK_WISH:STRING=${TCLHOME}/bin/wish"
 ### if Mesa is pre-installed
 if [ -n "$MESA_HOME" ]; then
@@ -130,7 +135,7 @@ check_job ${PRODUCT_DIR}/SETUPPYTHON.LOG python setup.py install --prefix=${PROD
 rm -fr ${PRODUCT_WORK} ${INSTALL_WORK}/cmake-1.6.6
 
 # set correct symbolic links - bug of python wrappings installation
-cd ${PRODUCT_DIR}/lib/python2.2/site-packages/vtk_python
+cd ${PRODUCT_DIR}/lib/python${python_version}/site-packages/vtk_python
 ln -sf ../../../vtk/*Python*.so .
 
 print_env
index 31bf63b1b5fc7591f5a6051704bbdb255fccf47a..d37a97eca30ecbdead71bd2806efcb67c6048180 100755 (executable)
@@ -2,13 +2,10 @@
 
 check_version()
 {
-if [ -n "$SIPDIR" ]; then
-    check_lib_version sip ${SIPDIR}
-    if [ "$?" -eq "0" ]; then
-       check_lib_version libsip.so.9.1.0 ${SIPDIR}
-       if [ "$?" -eq "0" ]; then
-           return 0
-       fi
+if [ -n "${SIPDIR}" ]; then
+    sip_ver=`${SIPDIR}/sip -V | awk '{print $1}'`
+    if [ "$sip_ver" == "3.3.2" ]; then
+       return 0
     fi
 fi
 return 1
@@ -19,8 +16,8 @@ print_env()
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export SIPDIR=\${INSTALL_ROOT}/${PRODUCT}
-export PYTHONPATH=\${SIPDIR}:\${PYTHONPATH}
 export PATH=\${SIPDIR}:\${PATH}
+export PYTHONPATH=\${SIPDIR}:\${PYTHONPATH}
 export LD_LIBRARY_PATH=\${SIPDIR}:\${LD_LIBRARY_PATH}
 ##
 EOF
@@ -35,9 +32,10 @@ if [ -z "${sipdir}" ] ; then
     sipdir="`find_in_path sip /usr/bin`"
 fi
 if [ -n "${sipdir}" ] ; then
+    python_version="`python -c 'import sys; print sys.version[:3]'`"
     sippython="`find_in_path libsip.so.9.1.0 ${PYTHONPATH}`"
     if [ -z "${sippython}" ] ; then
-       sippython="`find_in_path libsip.so.9.1.0 /usr/lib/python2.2/site-packages`"
+       sippython="`find_in_path libsip.so.9.1.0 /usr/lib/python${python_version}/site-packages`"
     fi
     if [ -n ${sippython} ]; then
        tmp="${sipdir} ${sipdir} \${PATH} ${PATH}";  
index 4d07206f4659ee751e4c3f1926770287b5b7ca88..64c64ee29604f2452e2fd988a5d72300a076ad2b 100755 (executable)
@@ -3,8 +3,8 @@
 check_version()
 {
 if [ -n "${SIPDIR}" ]; then
-    sip_ver=`${SIPDIR}/sip -V | awk '{print $1}' | sed "s/\./_/g"`
-    if [ "$sip_ver" == "4_1" ]; then
+    sip_ver=`${SIPDIR}/sip -V | awk '{print $1}'`
+    if [ "$sip_ver" == "4.1" ]; then
        return 0
     fi
 fi