mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-05 12:21:59 +02:00
[setup] add 'ALICEVISION_BIN_PATH' env. var to path
Enables to add AliceVision binaries folder to path (without having to manipulate PATH) using ALICEVISION_BIN_PATH.
This commit is contained in:
parent
eb8023e02c
commit
ff70b0bcd3
1 changed files with 5 additions and 0 deletions
|
@ -67,6 +67,9 @@ def setupEnvironment():
|
|||
val (str or list of str): the path(s) to add
|
||||
index (int): insertion index
|
||||
"""
|
||||
if not val:
|
||||
return
|
||||
|
||||
paths = os.environ.get(var, "").split(os.pathsep)
|
||||
|
||||
if not isinstance(val, (list, tuple)):
|
||||
|
@ -108,3 +111,5 @@ def setupEnvironment():
|
|||
if key not in os.environ and os.path.exists(value):
|
||||
logging.info("Set {}: {}".format(key, value))
|
||||
os.environ[key] = value
|
||||
else:
|
||||
addToEnvPath("PATH", os.environ.get("ALICEVISION_BIN_PATH", ""))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue