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-29 01:33:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-29 03:22:39 +0300
commit52b38d9c3d84485385d5bc2e58f16c5acfaca9b7 (patch)
tree30ec34f5ddcc9a59459df9710c0e763e2d3f1558 /release/scripts
parent911f9e00d13c57fb093b7ba7b930a340aa0a79a9 (diff)
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.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/modules/sys_info.py4
1 files changed, 2 insertions, 2 deletions
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: