]> SALOME platform Git repositories - tools/yacsgen.git/commitdiff
Salome HOME
Use config.txt from ASTER instead of an empty file. omu/pleiade8084 V7_5_0a1 V7_5_0b1
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Tue, 23 Sep 2014 16:03:28 +0000 (18:03 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Tue, 23 Sep 2014 16:03:28 +0000 (18:03 +0200)
module_generator/astcompo.py

index aa69f70641fa8a90c70fc36f58e5987a887da363..69fc4d12a0bb13ae8979c3797d6c151aff530575 100644 (file)
@@ -162,7 +162,22 @@ class ASTERComponent(Component):
     """standalone component: generate files for calculation code"""
 
     fdict={}
-    fdict["%s_config.txt" % self.name] = "# a completer"
+    #use a specific main program (modification of config.txt file)
+    config = ""
+    path_config = os.path.join(self.aster_dir, "config.txt")
+    if os.path.exists(path_config) :
+      fil = open(path_config)
+      config = fil.read()
+      fil.close()
+#      config = re.sub(" profile.sh", os.path.join(self.aster_dir, "profile.sh"), config)
+#      path=os.path.join(os.path.abspath(gen.module.prefix),'lib',
+#                      'python%s.%s' % (sys.version_info[0], sys.version_info[1]),
+#                      'site-packages','salome','%s_component.py'%self.name)
+#      config = re.sub("Execution\/E_SUPERV.py", path, config)
+    else :
+      config = "# a completer:%s n'existe pas" % path_config
+
+    fdict["%s_config.txt" % self.name] = config
     fdict["%s_component.py" % self.name] = component.substitute(component=self.name)
 
     return fdict