From ff70b0bcd34ebf1ba91a3b7f07c069e2b64bbf38 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Mon, 17 Jun 2019 13:06:18 +0200 Subject: [PATCH] [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. --- meshroom/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshroom/__init__.py b/meshroom/__init__.py index 8b6101a9..2a2fc4bb 100644 --- a/meshroom/__init__.py +++ b/meshroom/__init__.py @@ -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", ""))