From 52b38d9c3d84485385d5bc2e58f16c5acfaca9b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Oct 2020 09:33:15 +1100 Subject: PyAPI: point sys.executable to the Python binary `sys.executable` is documented to be a Python interpreter or None. This was set to Blender's executable which caused the multiprocessing module to spawn new instances of Blender instead of Python on WIN32. See issue described in D7815. Deprecate 'bpy.app.binary_path_python' & warn when using. Blender's executable remains accessible via `bpy.app.binary_path`. Modified 04c5471ceefb4, setting `sys.executable` instead of using Py_SetProgramName, which is needed for a bundled Python installation. --- release/scripts/modules/sys_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py index fc3ffe4dd88..cb80529f0f3 100644 --- a/release/scripts/modules/sys_info.py +++ b/release/scripts/modules/sys_info.py @@ -82,10 +82,10 @@ def write_sysinfo(filepath): output.write("\t%r\n" % p) output.write(title("Python (External Binary)")) - output.write("binary path: %s\n" % prepr(bpy.app.binary_path_python)) + output.write("binary path: %s\n" % prepr(sys.executable)) try: py_ver = prepr(subprocess.check_output([ - bpy.app.binary_path_python, + sys.executable, "--version", ]).strip()) except Exception as e: -- cgit v1.2.3