From a18bada2518cb1972fa9346ded47d8b5fba8863d Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Mon, 11 Aug 2025 11:08:15 +0200 Subject: [PATCH] use python 3.13 --- build_sdcard.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 590da3e70..f35b42845 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -423,8 +423,25 @@ apt-get autoremove -y echo -e "\n*** Python DEFAULT libs & dependencies ***" -if [ -f "/usr/bin/python3.11" ]; then - # use python 3.11 if available +if [ -f "/usr/bin/python3.13" ]; then + # use python 3.13 if available (Debian 13 Trixie) + update-alternatives --install /usr/bin/python python /usr/bin/python3.13 1 + # keep python backwards compatible + ln -s /usr/bin/python3.13 /usr/bin/python3.9 + ln -s /usr/bin/python3.13 /usr/bin/python3.10 + ln -s /usr/bin/python3.13 /usr/bin/python3.11 + ln -s /usr/bin/python3.13 /usr/bin/python3.12 + echo "python calls python3.13" +elif [ -f "/usr/bin/python3.12" ]; then + # use python 3.12 if available + update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 + # keep python backwards compatible + ln -s /usr/bin/python3.12 /usr/bin/python3.9 + ln -s /usr/bin/python3.12 /usr/bin/python3.10 + ln -s /usr/bin/python3.12 /usr/bin/python3.11 + echo "python calls python3.12" +elif [ -f "/usr/bin/python3.11" ]; then + # use python 3.11 if available (Debian 12 Bookworm) update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 # keep python backwards compatible ln -s /usr/bin/python3.11 /usr/bin/python3.9