From 04dab9d8e14655f6abf02f83558bbb0282269508 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Mon, 26 May 2014 11:19:31 +0200 Subject: [PATCH] Pleiade issue 8084, note 2. See https://forge-pleiade.der.edf.fr/issues/8084#note-2 --- module_generator/astcompo.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 -- 2.39.2