From: Ovidiu Mircescu Date: Mon, 26 May 2014 09:19:31 +0000 (+0200) Subject: Pleiade issue 8084, note 2. X-Git-Tag: V7_5_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=04dab9d8e14655f6abf02f83558bbb0282269508;p=tools%2Fyacsgen.git Pleiade issue 8084, note 2. See https://forge-pleiade.der.edf.fr/issues/8084#note-2 --- diff --git a/module_generator/astcompo.py b/module_generator/astcompo.py index ca97124..b22ebe0 100644 --- a/module_generator/astcompo.py +++ b/module_generator/astcompo.py @@ -262,10 +262,25 @@ ARGPYT | exec | - | %s importesuperv="" if self.version < (10,1,2): importesuperv="from E_SUPERV import SUPERV" - else : + elif self.version < (11,4,1) : importesuperv="""sys.path=["%s"]+sys.path from Execution.E_SUPERV import SUPERV """ % self.getAsterPythonPath() + else : + importesuperv=""" +VERS=stable +import os.path as osp +from asrun.run import AsRunFactory +from asrun.config import AsterConfig + +run = AsRunFactory() +path = run.get_version_path(VERS) +cfg = AsterConfig(osp.join(path, 'config.txt')) +pypath = cfg['REPPY'][0] + +sys.path.insert(0, pypath) +from Execution.E_SUPERV import SUPERV +""" return importesuperv