Salome HOME
Copyright update 2022
[tools/yacsgen.git] / Examples / cpp2 / components.py
index 2a4e02493f8ac83264955753662d4ff587e028ba..8b81892a0e70574120f3f48ab11dca8933c212bd 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
@@ -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 Generator,Module,Service,CPPComponent
 
 cwd=os.getcwd()
@@ -48,7 +48,6 @@ c1=CPPComponent("compo1",services=[
                        defs="//def1",body=body,
                  ),
           ],
-         includes="-I/usr/include",
          kind="exe",
          exe_path=os.path.join(cwd,"prog"),
          )
@@ -56,8 +55,8 @@ c1=CPPComponent("compo1",services=[
 
 g=Generator(Module("cppcompos",components=[c1],prefix="./install"),context)
 g.generate()
-g.bootstrap()
 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)