diff --git a/tests/Makefile b/tests/Makefile index 1555b559e5..79f5b8e703 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -44,8 +44,7 @@ else DLEXT ?= so EXEXT= SHARED_SUFFIX= -# python2 for POSIX since FreeBSD has only python2 as default. -PYTHON ?= python2 +PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi) endif # Zlib shared library extensions: