Salome HOME
Copyright update 2022
[tools/yacsgen.git] / Examples / ast2 / components.py
index d50a6f0ff7314ac892a8d0a6b7c8f3dfb4d001e8..d898cf93f8ca2bd76ed4d15f4290396234309b73 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2009-2012  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
 # 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
@@ -23,7 +23,7 @@
 import os
 
 #import context from ..
-execfile("../context.py")
+exec(compile(open("../context.py").read(), "../context.py", 'exec'))
 from module_generator import Generator,Module,ASTERComponent,Service,F77Component
 
 aster_root=os.path.join(aster_home,aster_version)
@@ -74,4 +74,4 @@ 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)