Salome HOME
Update copyright
[tools/hxx2salome.git] / scripts / SA_build
index 61c81b796352ce4daae931fbc8fdbdd96c671f0a..84d8b2bc2e44af4a6cf9ff4f22710094e507b507 100755 (executable)
@@ -1,4 +1,8 @@
 #!/bin/bash
+# --
+# Copyright (C) CEA, EDF
+# Author : Nicolas Crouzet (CEA)
+# --
 #
 # Utility for building Salome Modules
 #
@@ -259,6 +263,11 @@ update_environ()
        else
           echo -e "##\n#------ ${SOURCE_NAME}-Src ------\nexport $3=$4" >> ${ENVIRON_FILE}
           echo -e "##\n#------ ${SOURCE_NAME}-Bin ------\nexport $1=$2" >> ${ENVIRON_FILE}
+          if [ -d $2/lib ] && [ ! -d $2/lib/salome ]
+          then
+              # for salome modules, do nothing
+              echo -e "export PYTHONPATH=\${${1}}/bin:\${${1}}/lib:\${PYTHONPATH}" >> ${ENVIRON_FILE}
+          fi
        fi
     else
        grep " $1" ${ENVIRON_FILE}.old > /dev/null
@@ -272,6 +281,11 @@ update_environ()
        else
           echo -e "##\n#------ ${SOURCE_NAME}-Src ------\nsetenv $3 $4" >> ${ENVIRON_FILE}
           echo -e "##\n#------ ${SOURCE_NAME}-Bin ------\nsetenv $1 $2" >> ${ENVIRON_FILE}
+          if [ -d $2/lib ] && [ ! -d $2/lib/salome ]
+          then
+              echo -e "setenv PYTHONPATH \${${1}}/bin:\${${1}}/lib:\${PYTHONPATH}" >> ${ENVIRON_FILE}
+          fi
+
        fi
     fi
 }