From 11c2aab3fc99a6322b42a9749d7892c09016126f Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 21 Apr 2021 09:42:38 +0200 Subject: [PATCH] [EDF22374] : point to mesa libraries in salome_mesa context --- bin/salomeContext.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 3cfb38082..e7f6e2b1c 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -292,6 +292,7 @@ class SalomeContext: # def __setContextFromConfigFile(self, filename, reserved=None): + mesa_root_dir = "MESA_ROOT_DIR" if reserved is None: reserved = [] try: @@ -309,6 +310,16 @@ class SalomeContext: for var in unsetVars: self.unsetVariable(var) + # mesa stuff + if "MESA_GL_VERSION_OVERRIDE" in os.environ: + configVarsDict = {k:v for (k,v) in configVars} + if mesa_root_dir in configVarsDict: + path_to_mesa_lib = os.path.join(configVarsDict[mesa_root_dir],"lib") + if os.name == "posix": + self.addToVariable("LD_LIBRARY_PATH",path_to_mesa_lib) + else: + self.addToVariable("PATH",path_to_mesa_lib) + # set context for reserved in reservedDict: a = [_f for _f in reservedDict[reserved] if _f] # remove empty elements @@ -320,6 +331,7 @@ class SalomeContext: self.addToVariable(reserved, reformattedVals) pass + for key,val in configVars: self.setVariable(key, val, overwrite=True) pass -- 2.39.2