1
0
mirror of https://github.com/lutris/lutris synced 2024-07-02 23:18:43 +00:00

Add env var to allow using local packages

This commit is contained in:
Mathieu Comandon 2023-11-10 02:57:11 -08:00
parent fe55eda11f
commit e43cae9715

View File

@ -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