Salome HOME
Copyright update 2022
[tools/yacsgen.git] / Examples / context.py
index ed2317c9f7c942550cfc6698dc44efcf12385b64..9c024ac165a03c540efb3d3ac277d6f0c9dbfd1e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2014  EDF R&D
+# Copyright (C) 2009-2022  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 
 import os,sys
-sys.path.insert(0,"../..")
 
-SALOME_ROOT=os.path.expanduser("~/Salome/Install")
-SALOME_PREREQ=os.path.expanduser("~/.packages.d/envSalome6main")
+SALOME_ROOT=os.getenv("ROOT_SALOME_INSTALL")
+SALOME_PREREQ=os.path.join(SALOME_ROOT, "env.d", "envProducts.sh")
 
-KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR",os.path.join(SALOME_ROOT,"KERNEL_V6"))
-GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR",os.path.join(SALOME_ROOT,"GUI_V6"))
-YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR",os.path.join(SALOME_ROOT,"YACS_V6"))
-GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR",os.path.join(SALOME_ROOT,"GEOM_V6"))
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","")
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","")
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","")
+GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR","")
 
 context={'update':1,
          "makeflags":"",
@@ -36,6 +35,6 @@ context={'update':1,
          "geom":GEOM_ROOT_DIR,
         }
 
-
-aster_home=os.path.expanduser("~/Aster/V10.3/aster")
-aster_version="STA10.3"
+sys.path.insert(0, SALOME_ROOT)
+import salome_common
+SYS_MODULES=salome_common.MODULES