mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Add env var to allow using local packages
This commit is contained in:
parent
fe55eda11f
commit
e43cae9715
|
@ -23,7 +23,8 @@ LAUNCH_PATH = dirname(realpath(__file__))
|
||||||
# Prevent loading Python modules from home folder
|
# Prevent loading Python modules from home folder
|
||||||
# They can interfere with Lutris and prevent it
|
# They can interfere with Lutris and prevent it
|
||||||
# from working.
|
# 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")):
|
if os.path.isdir(os.path.join(LAUNCH_PATH, "../lutris")):
|
||||||
sys.dont_write_bytecode = True
|
sys.dont_write_bytecode = True
|
||||||
|
|
Loading…
Reference in a new issue