From e43cae97159e6438711022b1403ee12f56a4a6dd Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Fri, 10 Nov 2023 02:57:11 -0800 Subject: [PATCH] Add env var to allow using local packages --- bin/lutris | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/lutris b/bin/lutris index d9bffa725..7b3907240 100755 --- a/bin/lutris +++ b/bin/lutris @@ -23,7 +23,8 @@ LAUNCH_PATH = dirname(realpath(__file__)) # Prevent loading Python modules from home folder # They can interfere with Lutris and prevent it # from working. -sys.path = [path for path in sys.path if not path.startswith("/home") and not path.startswith("/var/home")] +if os.environ.get("LUTRIS_ALLOW_LOCAL_PYTHON_PACKAGES") != "1": + sys.path = [path for path in sys.path if not path.startswith("/home") and not path.startswith("/var/home")] if os.path.isdir(os.path.join(LAUNCH_PATH, "../lutris")): sys.dont_write_bytecode = True