Salome HOME
Deal with ref count server side.
[modules/kernel.git] / bin / setenv.py
index 44ac6dbe7e83fba3630e7db15f6dc34cb579cb27..cb5c8d8d0b897bd100ebf43970ff61c19a1fc18d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -8,7 +8,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -172,7 +172,8 @@ def set_env(args, modules_list, modules_root_dir, silent=False):
     for module in modules_list :
         if modules_root_dir.has_key(module):
             module_root_dir = modules_root_dir[module]
-            modules_root_dir_list[:0] = [module_root_dir]
+            if module_root_dir not in modules_root_dir_list:
+              modules_root_dir_list[:0] = [module_root_dir]
             if sys.platform == "win32":
               add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
                      "PATH")