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
9bf3866e
Commit
9bf3866e
authored
4 months ago
by
Papeleux Luc
Browse files
Options
Downloads
Patches
Plain Diff
rename configLDLIBRARYPATH in config_ld_library_path
parent
d028fd80
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
+7
-5
7 additions, 5 deletions
externalProgramPath.py
with
7 additions
and
5 deletions
externalProgramPath.py
+
7
−
5
View file @
9bf3866e
...
...
@@ -2,6 +2,9 @@
# -*- coding: utf-8 -*-
#
# Define external program paths according to local configuration
#
# under linux, call config_ld_library_path(key) to extend LD_LIBRARY_PATH to be able to find .so
#
from
prmClasses
import
*
import
os
,
os
.
path
,
shutil
#, distutils.spawn
...
...
@@ -113,15 +116,14 @@ class ExtProgs(PRMSet):
SaveAction
(
self
.
actions
,
'
S
'
)
QuitAction
(
self
.
actions
,
'
Q
'
)
def
configLDLIBRARYPATH
(
self
,
key
):
def
config
_ld_library_path
(
self
,
key
):
# add progPath/bin/../lib to
LD
_
LIBRARY
_
PATH
(else may not found .so)
progLibPath
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
self
.
pars
[
key
].
val
)),
'
..
'
,
'
lib
'
))
if
os
.
path
.
exist
(
progLibPath
):
if
os
.
path
.
exist
s
(
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
if
os
.
path
.
exists
(
p
)
and
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
'
]
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