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 <ideasman42@gmail.com>2020-10-28 11:40:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-28 11:40:52 +0300
commita8ca79cbe694ee7639343695d6367d30cb2ab589 (patch)
tree0f2cc9197f2821a25a480a539d27bd9c391890ad /source/blender/python/intern/bpy_interface.c
parent4f24808d08f47af661104f5976e17c57e8086ea9 (diff)
Revert "PyAPI: point sys.executable to the Python binary"
This reverts commit 04c5471ceefb41c9e49bf7c86f07e9e7b8426bb3. This causes Blender not to start on some systems.
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 894a9a69198..c4523363a91 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -306,22 +306,12 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
PyThreadState *py_tstate = NULL;
const char *py_path_bundle = BKE_appdir_folder_id(BLENDER_SYSTEM_PYTHON, NULL);
- /* Setting the program name is important so the 'multiprocessing' module
- * can launch new Python instances. */
+ /* Not essential but nice to set our name. */
{
- char program_path[FILE_MAX];
- if (BKE_appdir_program_python_search(
- program_path, sizeof(program_path), PY_MAJOR_VERSION, PY_MINOR_VERSION)) {
- wchar_t program_path_wchar[FILE_MAX];
- BLI_strncpy_wchar_from_utf8(
- program_path_wchar, program_path, ARRAY_SIZE(program_path_wchar));
- Py_SetProgramName(program_path_wchar);
- }
- else {
- fprintf(stderr,
- "Unable to find the python binary, "
- "the multiprocessing module may not be functional!\n");
- }
+ const char *program_path = BKE_appdir_program_path();
+ wchar_t program_path_wchar[FILE_MAX];
+ BLI_strncpy_wchar_from_utf8(program_path_wchar, program_path, ARRAY_SIZE(program_path_wchar));
+ Py_SetProgramName(program_path_wchar);
}
/* must run before python initializes */