[Bf-blender-cvs] [684c771263d] master: Fix: Python warning in windows debug builds
Ray Molenkamp
noreply at git.blender.org
Wed Dec 16 15:27:52 CET 2020
Commit: 684c771263db1a5a7dbf65cde97e672d94b57839
Author: Ray Molenkamp
Date: Wed Dec 16 07:27:47 2020 -0700
Branches: master
https://developer.blender.org/rB684c771263db1a5a7dbf65cde97e672d94b57839
Fix: Python warning in windows debug builds
When doing a debug build on windows, blender will
start with the following warning:
"Unable to find the python binary, the multiprocessing
module may not be functional!"
The root cause for this issue is: for a debug build
the python binary is called python_d.exe rather than
just python.exe
This change fixes BKE_appdir_program_python_search
to look for the _d suffix for debug builds on windows
Differential Revision: https://developer.blender.org/D9775
Reviewed by: Campbell Barton
===================================================================
M source/blender/blenkernel/intern/appdir.c
===================================================================
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index a6b3985e80d..ae0c27635a6 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -906,14 +906,20 @@ bool BKE_appdir_program_python_search(char *fullpath,
const char *python_build_def = STRINGIFY(PYTHON_EXECUTABLE_NAME);
#endif
const char *basename = "python";
+#if defined(WIN32) && !defined(NDEBUG)
+ const char *basename_debug = "python_d";
+#endif
char python_version[16];
/* Check both possible names. */
const char *python_names[] = {
#ifdef PYTHON_EXECUTABLE_NAME
- python_build_def,
+ python_build_def,
+#endif
+#if defined(WIN32) && !defined(NDEBUG)
+ basename_debug,
#endif
- python_version,
- basename,
+ python_version,
+ basename,
};
bool is_found = false;
More information about the Bf-blender-cvs
mailing list