Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-05-18 04:31:04 +0300
committerCampbell Barton <campbell@blender.org>2022-05-18 04:37:53 +0300
commitebb492a389d42186b254c56f3cd3a42b72c5f57b (patch)
treeca9b47ac864f718eaca92312a2ed10dc9400b490 /source/blender/python/intern/bpy_interface.c
parentdf26f4f63a90604c5199c2288f9dde8992abfb25 (diff)
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).
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c8
1 files changed, 8 insertions, 0 deletions
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);
}