ifcopenshell-python Makefile - simplify pyversion check, similar to 6409f41

This commit is contained in:
Andrej730
2026-03-18 11:37:50 +05:00
parent 888158570a
commit f0b27a0910
+7 -18
View File
@@ -27,26 +27,15 @@ SED:=sed -i '' -e
endif
endif
# TODO: we should simplify this at some point...
ifeq ($(PYVERSION), py310)
PYNUMBER:=310
endif
ifeq ($(PYVERSION), py311)
PYNUMBER:=311
endif
ifeq ($(PYVERSION), py312)
PYNUMBER:=312
endif
ifeq ($(PYVERSION), py313)
PYNUMBER:=313
endif
ifeq ($(PYVERSION), py314)
PYNUMBER:=314
endif
ifndef PYNUMBER
$(error Unsupported PYVERSION '$(PYVERSION)')
SUPPORTED_PYVERSIONS := py310 py311 py312 py313 py314
ifeq ($(filter $(PYVERSION),$(SUPPORTED_PYVERSIONS)),)
$(error Unsupported PYVERSION=$(PYVERSION). Must be one of $(SUPPORTED_PYVERSIONS))
endif
PYMINOR:=$(subst py3,,$(PYVERSION))
PYNUMBER:=3$(PYMINOR)
# We actually do support glibc 2.28-2.30 (see #5636)
# but those are old and there's no demand for it.
ifeq ($(PLATFORM), linux64)