diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-16 13:11:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-16 19:36:29 +0300 |
commit | 7c2f0074f3fe2411daa7a6e351d7cbc535246871 (patch) | |
tree | d14d88373b7d69de649b29fd65c0c5b9b6df8406 /source/blender/python/BPY_extern.h | |
parent | abdaf2a4f509f79bf2f0eb231341858045957573 (diff) |
Python: disable environment variables by default
This avoids the problem where Blender doesn't start because
the PYTHONPATH points to an incompatible Python version,
see T72807.
Previously we chose to assume people who set the PYTHONPATH know what
they're doing, however users may have set this for non Blender projects.
So it's not obvious that this is the cause of Blender not to launch
on their system.
To use Python's environment vars, pass the argument:
--python-use-system-env
Note that this only impacts Python run-time environment variables
documented in `python --help`, Access from `os.environ` remains.
Diffstat (limited to 'source/blender/python/BPY_extern.h')
-rw-r--r-- | source/blender/python/BPY_extern.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index be2fd6c4e53..810c86c115a 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -51,6 +51,7 @@ int BPY_is_pyconstraint(struct Text *text); void BPY_python_start(int argc, const char **argv); void BPY_python_end(void); void BPY_python_reset(struct bContext *C); +void BPY_python_use_system_env(void); /* global interpreter lock */ |