Skip to content

Commit

Permalink
colomoto.setup_help: also export LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
pauleve committed Mar 24, 2022
1 parent 80fdcd4 commit 6116fb3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions colomoto/setup_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@
PREFIXES = [os.path.join(os.getenv("APPDATA"), "colomoto")]
binpaths = [os.path.join(p,"bin") for p in PREFIXES] \
+ [os.path.join(p,"Library","bin") for p in PREFIXES]
libpaths = [os.path.join(p,"lib") for p in PREFIXES] \
+ [os.path.join(p,"Library","lib") for p in PREFIXES]
else:
PREFIXES = ["/usr/local/share/colomoto",
os.path.join(os.path.expanduser("~"), ".local", "share", "colomoto")]
binpaths = [os.path.join(p, "bin") for p in PREFIXES]
libpaths = [os.path.join(p, "lib") for p in PREFIXES]

binpaths = [p for p in binpaths if os.path.exists(p)]
if binpaths:
os.environ["PATH"] = "%s:%s" % (":".join(binpaths), os.environ["PATH"])
libpaths = [p for p in libpaths if os.path.exists(p)]
if libpaths:
ldpath = os.environ.get("LD_LIBRARY_PATH", "")
if ldpath:
libpaths.append(ldpath)
os.environ["LD_LIBRARY_PATH"] = ":".join(libpaths)
#
##

Expand Down

0 comments on commit 6116fb3

Please # to comment.