From d3a5654146d64286ed5e92b1956329c993c7e105 Mon Sep 17 00:00:00 2001 From: crouzet Date: Tue, 5 Jun 2018 09:26:25 +0200 Subject: [PATCH] =?utf8?q?sat=20#8560=20:=20ajout=20des=20poign=C3=A9es=20?= =?utf8?q?set=5Fenv=5Fbuild=20et=20set=5Fenv=5Flaunch=20pour=20mieux=20g?= =?utf8?q?=C3=A9rer=20les=20environnement=20de=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/environment.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/environment.py b/src/environment.py index b343c59..66efe01 100644 --- a/src/environment.py +++ b/src/environment.py @@ -644,10 +644,22 @@ class SalomeEnviron: pyproduct = imp.load_source(product_info.name + "_env_script", env_script) if not native: - pyproduct.set_env(self, - product_info.install_dir, - product_info.version) + if self.forBuild and "set_env_build" in dir(pyproduct): + pyproduct.set_env_build(self, + product_info.install_dir, + product_info.version) + elif (not self.forBuild) and "set_env_launch" in dir(pyproduct): + pyproduct.set_env_launch(self, + product_info.install_dir, + product_info.version) + else: + # at least this one is mandatoryi, + # if set_env_build and set_env_build are not defined + pyproduct.set_env(self, + product_info.install_dir, + product_info.version) else: + # not mandatory, if set_nativ_env not defined, we do nothing if "set_nativ_env" in dir(pyproduct): pyproduct.set_nativ_env(self) except: -- 2.39.2