From: Anthony Geay Date: Wed, 21 Apr 2021 07:42:38 +0000 (+0200) Subject: [EDF22374] : point to mesa libraries in salome_mesa context X-Git-Tag: V9_7_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11c2aab3fc99a6322b42a9749d7892c09016126f;p=modules%2Fkernel.git [EDF22374] : point to mesa libraries in salome_mesa context --- 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