2 Example with one Code_Aster component and one fortran component
5 from module_generator import Generator,Module,ASTERComponent,Service,F77Component
7 context={'update':1,"prerequisites":"/local/cchris/.packages.d/envSalome50",
8 "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5"}
9 aster_home="/local/chris/ASTER/instals"
10 aster_root=os.path.join(aster_home,"NEW9")
11 asrun=os.path.join(aster_home,"ASTK/ASTK_SERV/bin/as_run")
13 fcompodir=os.path.join(os.getcwd(),"fcompo")
14 myasterdir=os.path.join(os.getcwd(),"myaster","bibpyt")
15 install_prefix="./install"
17 export="""F exec %s D 0
19 """ % (os.path.join(os.getcwd(),"myaster","aster.exe"),os.path.join(os.getcwd(),"myaster","commande"))
21 c1=ASTERComponent("caster",services=[
22 Service("s1",inport=[("argv","string"),("a","double"),("b","long"),("c","string")],
23 outport=[("d","double")],
24 instream=[("aa","CALCIUM_double","T"),("ab","CALCIUM_double","I"),
25 ("ac","CALCIUM_integer","I"),("ad","CALCIUM_real","I"),
26 ("ae","CALCIUM_string","I"),("af","CALCIUM_complex","I"),
27 ("ag","CALCIUM_logical","I"),
29 outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I")],
33 exe_path=os.path.join(os.getcwd(),"exeaster"),
39 c2=F77Component("cfort",services=[
40 Service("s1",inport=[("a","double"),("b","long"),("c","string")],
41 outport=[("d","double"),("e","long"),("f","string")],
42 instream=[("a","CALCIUM_double","T"),("b","CALCIUM_double","I")],
43 outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I"),
44 ("bc","CALCIUM_integer","I"),("bd","CALCIUM_real","I"),
45 ("be","CALCIUM_string","I"),("bf","CALCIUM_complex","I"),
46 ("bg","CALCIUM_logical","I"),
52 exe_path=os.path.join(fcompodir,"prog"),
55 g=Generator(Module("astmod",components=[c1,c2],prefix=install_prefix),context)
61 g.make_appli(appli_dir,restrict=["KERNEL","GUI","YACS"])