From 036c74e901447d8445e32a30156795b4abf03180 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 22 Jul 2026 17:59:34 +0500 Subject: [PATCH] downstream: dev_environment.py: detect Python 3.13 on any Blender 5.1+ --- src/bonsai/scripts/dev_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bonsai/scripts/dev_environment.py b/src/bonsai/scripts/dev_environment.py index e9a8d2a44f..318dfd674f 100644 --- a/src/bonsai/scripts/dev_environment.py +++ b/src/bonsai/scripts/dev_environment.py @@ -78,7 +78,8 @@ BONSAI_PATH = find_bonsai_path() # --------------------------- # Never changed by user. -PYTHON_VERSION = "3.13" if BLENDER_VERSION == "5.1" else "3.11" +BLENDER_VERSION_INT = tuple(map(int, BLENDER_VERSION.split("."))) +PYTHON_VERSION = "3.13" if BLENDER_VERSION_INT >= (5, 1) else "3.11" PACKAGE_PATH = BLENDER_PATH / rf"extensions/.local/lib/python{PYTHON_VERSION}/site-packages"