Skip to content
Snippets Groups Projects
Commit e0da08da authored by Christian Goetze (CG)'s avatar Christian Goetze (CG)
Browse files

Clean up the LD_LIBRARY_PATH list prior to re-assembling it into a string.

parent e7dc84df
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,11 @@ def main(command, libpath=[], vars={}):
# Append the sequence in libpath
print "%s += %r" % (var, libpath)
dirs.extend(libpath)
# Filter out some useless pieces
clean_dirs = []
for dir in dirs:
if dir and dir not in ('', '.'):
clean_dirs.append(dir)
# Now rebuild the path string. This way we use a minimum of separators
# -- and we avoid adding a pointless separator when libpath is empty.
os.environ[var] = os.pathsep.join(dirs)
......
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