Salome HOME
A way to deal with environment modules.
[tools/yacsgen.git] / Examples / pygui1 / components.py
index 4412c7cadfbdb2065c24ac7d70cc0efde82a85ed..bbb449153f22e164b8b2af5ac8fa4605c1d13c63 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015  EDF R&D
+# Copyright (C) 2009-2021  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
@@ -20,7 +20,7 @@
 import os
 
 #import context from ..
-execfile("../context.py")
+exec(compile(open("../context.py").read(), "../context.py", 'exec'))
 
 from module_generator import *
 
@@ -48,7 +48,7 @@ class A(SALOME_DriverPy.SALOME_DriverPy_i):
     def createObject( self, study, name ):
       "Create object.  "
       try:
-        print study,name
+        print (study,name)
         builder = study.NewBuilder()
         father = study.FindComponent( "pycompos" )
         if father is None:
@@ -109,9 +109,11 @@ modul=Module("pycompos",components=[c1],prefix="./install",
 
 g=Generator(modul,context)
 g.generate()
+#g.configure("-DTBB_INCLUDE_DIR=/opt/tbb/2018.u6/include  -DTBB_ROOT=/opt/tbb/2018.u6/")
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR,
+                                "YACS":YACS_ROOT_DIR}, sys_modules=SYS_MODULES)