configure: add a version check for python.

Tooling used by HaikuDepotServer relies on typing features that
exist in Python >= 3.9.

Change-Id: I926d464130a3cef331a00b9a6abbbad5edfcefda
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8326
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Jessica Hamilton 2024-09-12 12:21:22 +00:00 committed by waddlesplash
parent e22ea41c57
commit c40570934e

13
configure vendored
View File

@ -889,6 +889,19 @@ else
exit 1
fi
# check is python is new enough
# usage of python by HDS requires at least 3.9
PYTHON_VERSION=$("$HOST_PYTHON" --version | sed -e 's/Python //')
case $PYTHON_VERSION in
2.* | 3.[1-8].*)
echo "Python $PYTHON_VERSION is too old, need at least Python 3.9"
exit 1
;;
*)
;;
esac
# check if nasm can actually output ELF files
# (the stock version in OSX can't)
# XXX: should probably only test for x86* arch