From 7ba7453f7088cae62b0819a956af9adcd852e78b Mon Sep 17 00:00:00 2001 From: crouzet Date: Thu, 5 Apr 2012 11:42:23 +0000 Subject: [PATCH] Merge from V6_main (tag V6_main_20120405) --- Examples/ast1/myaster/Makefile | 2 -- Examples/makefile.inc | 1 + module_generator/astcompo.py | 2 ++ module_generator/gener.py | 5 +++++ setup.py | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Examples/ast1/myaster/Makefile b/Examples/ast1/myaster/Makefile index 92341c9..bf2950d 100644 --- a/Examples/ast1/myaster/Makefile +++ b/Examples/ast1/myaster/Makefile @@ -19,8 +19,6 @@ include ../../makefile.inc -MED2HOME=/local/cchris/pkg/med235/install - ASTER_INSTALL=$(ASTER_ROOT)/$(ASTER_VERSION) ASTER_PUB=$(ASTER_ROOT)/public ASTER_OUTILS=$(ASTER_ROOT)/outils diff --git a/Examples/makefile.inc b/Examples/makefile.inc index 7bf24a2..b6e8450 100644 --- a/Examples/makefile.inc +++ b/Examples/makefile.inc @@ -18,6 +18,7 @@ # KERNEL_ROOT_DIR=$(HOME)/Salome/Install/KERNEL_V6 +MED2HOME=/temp ASTER_ROOT=$(HOME)/Aster/V10.3/aster ASTER_VERSION=STA10.3 diff --git a/module_generator/astcompo.py b/module_generator/astcompo.py index 062f26a..098487b 100644 --- a/module_generator/astcompo.py +++ b/module_generator/astcompo.py @@ -182,6 +182,7 @@ class ASTERComponent(Component): '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) + config += "ENV_SH | env | - | " + self.prerequisites + "\n" fdict["%s_config.txt" % self.name] = config fdict["%s_component.py" % self.name] = component.substitute(component=self.name) @@ -214,6 +215,7 @@ class ASTERComponent(Component): 'python%s.%s' % (sys.version_info[0], sys.version_info[1]), 'site-packages','salome','%s_container.py' % self.name) config = re.sub("Execution\/E_SUPERV.py", path, config) + config += "ENV_SH | env | - | " + self.prerequisites + "\n" fdict["%s_container.py" % self.name] = container fdict["%s_config.txt" % self.name] = config diff --git a/module_generator/gener.py b/module_generator/gener.py index ff1c535..f110e35 100644 --- a/module_generator/gener.py +++ b/module_generator/gener.py @@ -160,6 +160,9 @@ class Component(object): def getMakefileItems(self,gen): return {} + def setPrerequisites(self, prerequisites_file): + self.prerequisites = prerequisites_file + class Service(object): """ A :class:`Service` instance represents a component service with dataflow and datastream ports. @@ -311,6 +314,8 @@ class Generator(object): self.aster = "" if self.module.gui and not self.gui: raise Invalid("To generate a module with GUI, you need to set the 'gui' parameter in the context dictionnary") + for component in self.module.components: + component.setPrerequisites(self.context.get("prerequisites")) def generate(self): """Generate a SALOME source module""" diff --git a/setup.py b/setup.py index 74d9622..bbba7ef 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ from distutils.core import setup setup(name='YACSGEN', - version='6.3.1', + version='6.4.0', author='C. Caremoli', packages=['module_generator'], scripts=['script/hxx2salome.py',] -- 2.39.2