diff --git a/ChangeLog.d/makefile-python-windows.txt b/ChangeLog.d/makefile-python-windows.txt new file mode 100644 index 000000000..57ccc1a39 --- /dev/null +++ b/ChangeLog.d/makefile-python-windows.txt @@ -0,0 +1,4 @@ +Bugfix + * The GNU makefiles invoke python3 in preference to python except on Windows. + The check was accidentally not performed when cross-compiling for Windows + on Linux. Fix this. Fixes #4774. diff --git a/tests/Makefile b/tests/Makefile index 59ed45a66..6be6f330f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -49,11 +49,15 @@ LOCAL_LDFLAGS += -lws2_32 ifdef SHARED SHARED_SUFFIX=.$(DLEXT) endif -PYTHON ?= python else DLEXT ?= so EXEXT= SHARED_SUFFIX= +endif + +ifdef WINDOWS +PYTHON ?= python +else PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi) endif