From ebb492a389d42186b254c56f3cd3a42b72c5f57b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 May 2022 11:31:04 +1000 Subject: Python: log the status of '--python-use-system-env' on initialization Report when the PYTHONPATH is expected to be used to help debug Python initialization issues (see T98131). --- source/blender/python/intern/bpy_interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index baad2e6a2c2..5c9de638d8a 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -312,6 +312,14 @@ void BPY_python_start(bContext *C, int argc, const char **argv) PyPreConfig preconfig; PyStatus status; + /* To narrow down reports where the systems Python is inexplicably used, see: T98131. */ + CLOG_INFO( + BPY_LOG_INTERFACE, + 2, + "Initializing %s support for the systems Python environment such as 'PYTHONPATH' and " + "the user-site directory.", + py_use_system_env ? "*with*" : "*without*"); + if (py_use_system_env) { PyPreConfig_InitPythonConfig(&preconfig); } -- cgit v1.2.3