Skip to content
Snippets Groups Projects
Commit f483ab6a authored by Papeleux Luc's avatar Papeleux Luc
Browse files

add configLDLIBRARYPATH function to find .so using install version of Metafor

parent b8f3a829
No related branches found
Tags v3042
No related merge requests found
...@@ -91,7 +91,7 @@ class ExtProgs(PRMSet): ...@@ -91,7 +91,7 @@ class ExtProgs(PRMSet):
print("\t Use 'externalProgramPathGui' to define the full program path (recommanded)") print("\t Use 'externalProgramPathGui' to define the full program path (recommanded)")
print("\t or add %s in your user path (not recommanded)"%key) print("\t or add %s in your user path (not recommanded)"%key)
return False return False
def configAction(self): def configAction(self):
PRMAction(self.actions, 'a', self.pars['SAMCEF']) PRMAction(self.actions, 'a', self.pars['SAMCEF'])
PRMAction(self.actions, 'b', self.pars['GMSH']) PRMAction(self.actions, 'b', self.pars['GMSH'])
...@@ -113,6 +113,15 @@ class ExtProgs(PRMSet): ...@@ -113,6 +113,15 @@ class ExtProgs(PRMSet):
SaveAction(self.actions , 'S') SaveAction(self.actions , 'S')
QuitAction(self.actions , 'Q') QuitAction(self.actions , 'Q')
def configLDLIBRARYPATH(self, key):
progLibPath = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(self.pars[key].val)),'..','lib'))
if os.path.exist(progLibPath):
for p in os.environ['LD_LIBRARY_PATH'].split(':'):
if os.path.samefile(progLibPath, p): # deja dans le LD_LIBRARY_PATH => on skippe l'ajout
break
else : # pas trouvé dans le LD_LIBRARY_PATH => on ajoute dans le LD_LIBRARY_PATH
os.environ['LD_LIBRARY_PATH'] = progLibPath + ':' + os.environ['LD_LIBRARY_PATH']
#================================================================================= #=================================================================================
def main(): def main():
progsConf = ExtProgs() #verb=True) progsConf = ExtProgs() #verb=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment