Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
f483ab6a
Commit
f483ab6a
authored
4 months ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
add configLDLIBRARYPATH function to find .so using install version of Metafor
parent
b8f3a829
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
externalProgramPath.py
+10
-1
10 additions, 1 deletion
externalProgramPath.py
with
10 additions
and
1 deletion
externalProgramPath.py
+
10
−
1
View file @
f483ab6a
...
...
@@ -91,7 +91,7 @@ class ExtProgs(PRMSet):
print
(
"
\t
Use
'
externalProgramPathGui
'
to define the full program path (recommanded)
"
)
print
(
"
\t
or add %s in your user path (not recommanded)
"
%
key
)
return
False
def
configAction
(
self
):
PRMAction
(
self
.
actions
,
'
a
'
,
self
.
pars
[
'
SAMCEF
'
])
PRMAction
(
self
.
actions
,
'
b
'
,
self
.
pars
[
'
GMSH
'
])
...
...
@@ -113,6 +113,15 @@ class ExtProgs(PRMSet):
SaveAction
(
self
.
actions
,
'
S
'
)
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
():
progsConf
=
ExtProgs
()
#verb=True)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment