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.
This commit is contained in:
Brecht Van Lommel 2024-01-12 16:08:48 +01:00
parent 2a97516610
commit 679721ed64

@ -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