]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
0019954: Pb in setenv.py
authordmv <dmv@opencascade.com>
Tue, 12 Aug 2008 10:43:08 +0000 (10:43 +0000)
committerdmv <dmv@opencascade.com>
Tue, 12 Aug 2008 10:43:08 +0000 (10:43 +0000)
bin/setenv.py

index c5b9f418d2dfad3a18ce1cd635bead4a5c439da5..7bbc61a3467756fddba8062b1a27cb9e1eecd1c1 100755 (executable)
@@ -189,9 +189,45 @@ def set_env(args, modules_list, modules_root_dir, silent=False):
                                   salome_subdir,
                                   "shared_modules"),
                      "PYTHONPATH")
-            pass
-        pass
-
+            
+            # set environment for SMESH plugins
+            if module == "SMESH" :
+                os.environ["SMESH_MeshersList"]="StdMeshers"
+                if not os.environ.has_key("SALOME_StdMeshersResources"):
+                    os.environ["SALOME_StdMeshersResources"] \
+                    = modules_root_dir["SMESH"]+"/share/"+salome_subdir+"/resources/smesh"
+                    pass
+                if args.has_key("SMESH_plugins"):
+                    for plugin in args["SMESH_plugins"]:
+                        plugin_root = ""
+                        if os.environ.has_key(plugin+"_ROOT_DIR"):
+                            plugin_root = os.environ[plugin+"_ROOT_DIR"]
+                        else:
+                            # workaround to avoid modifications of existing environment
+                            if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
+                                plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
+                                pass
+                            pass
+                        if plugin_root != "":
+                            os.environ["SMESH_MeshersList"] \
+                            = os.environ["SMESH_MeshersList"]+":"+plugin
+                            if not os.environ.has_key("SALOME_"+plugin+"Resources"):
+                                os.environ["SALOME_"+plugin+"Resources"] \
+                                = plugin_root+"/share/"+salome_subdir+"/resources/"+plugin.lower()
+                                add_path(os.path.join(plugin_root,get_lib_dir(),python_version, "site-packages",salome_subdir), "PYTHONPATH")
+                                add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PYTHONPATH")
+                                
+                                if sys.platform == "win32":
+                                    add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH")
+                                else:
+                                    add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH")
+                                    add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH")
+                                    add_path(os.path.join(plugin_root,"bin",salome_subdir), "PATH")
+                                    pass
+                                pass
+                            pass
+                        pass
+            
     if sys.platform == 'win32':
         os.environ["SALOMEPATH"]=";".join(modules_root_dir_list)
     else:
@@ -206,51 +242,6 @@ def set_env(args, modules_list, modules_root_dir, silent=False):
     if args['logger']:
         os.environ["SALOME_trace"]="with_logger"
 
-    # set environment for SMESH plugins
-
-    if "SMESH" in modules_list:
-        os.environ["SMESH_MeshersList"]="StdMeshers"
-        if not os.environ.has_key("SALOME_StdMeshersResources"):
-            os.environ["SALOME_StdMeshersResources"] \
-            = modules_root_dir["SMESH"]+"/share/"+salome_subdir+"/resources/smesh"
-            pass
-        if args.has_key("SMESH_plugins"):
-            for plugin in args["SMESH_plugins"]:
-                plugin_root = ""
-                if os.environ.has_key(plugin+"_ROOT_DIR"):
-                    plugin_root = os.environ[plugin+"_ROOT_DIR"]
-                else:
-                    # workaround to avoid modifications of existing environment
-                    if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
-                        plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
-                        pass
-                    pass
-                if plugin_root != "":
-                    os.environ["SMESH_MeshersList"] \
-                    = os.environ["SMESH_MeshersList"]+":"+plugin
-                    if not os.environ.has_key("SALOME_"+plugin+"Resources"):
-                        os.environ["SALOME_"+plugin+"Resources"] \
-                        = plugin_root+"/share/"+salome_subdir+"/resources/"+plugin.lower()
-                    add_path(os.path.join(plugin_root,get_lib_dir(),python_version,
-                                          "site-packages",salome_subdir),
-                             "PYTHONPATH")
-                    add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
-                             "PYTHONPATH")
-
-
-                    if sys.platform == "win32":
-                      add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
-                          "PATH")
-                    else:
-                      add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir),
-                               "LD_LIBRARY_PATH")
-                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
-                             "PYTHONPATH")
-                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
-                             "PATH")
-            pass
-        pass
-
     # set environment for SUPERV module
     os.environ["ENABLE_MACRO_NODE"]="1"
     # set resources variables if not yet set