From 679721ed64b7723664eabbaf518520e7eeec9d5e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 12 Jan 2024 16:08:48 +0100 Subject: [PATCH] Fix: make update fails in some cases after recent changes After defaulting to the Python binary from the precompiled libraries, what could happen was that an older Python lib folder stuck around because of pycache files, but there was no actual working Python binary for that version. Check for the existence of the binary instead of the lib files to solve it. Also allow Python 3.10 binary for make update. --- GNUmakefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index eb7f501522d..ecd1f6bbd6d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -210,14 +210,17 @@ endif # Find the newest Python version bundled in `LIBDIR`. PY_LIB_VERSION:=3.15 -ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION))) +ifeq (, $(wildcard $(LIBDIR)/python/bin/python$(PY_LIB_VERSION))) PY_LIB_VERSION:=3.14 - ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION))) + ifeq (, $(wildcard $(LIBDIR)/python/bin/python$(PY_LIB_VERSION))) PY_LIB_VERSION:=3.13 - ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION))) + ifeq (, $(wildcard $(LIBDIR)/python/bin/python$(PY_LIB_VERSION))) PY_LIB_VERSION:=3.12 - ifeq (, $(wildcard $(LIBDIR)/python/lib/python$(PY_LIB_VERSION))) + ifeq (, $(wildcard $(LIBDIR)/python/bin/python$(PY_LIB_VERSION))) PY_LIB_VERSION:=3.11 + ifeq (, $(wildcard $(LIBDIR)/python/bin/python$(PY_LIB_VERSION))) + PY_LIB_VERSION:=3.10 + endif endif endif endif