diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 2378f5ad90c..8b138cfc44e 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -201,7 +201,8 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \ $(eval $(call TestHostCommand,python3-distutils, \ Please install the Python3 distutils module, \ - $(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util')) + printf 'from sys import version_info\nif version_info < (3, 12):\n\tfrom distutils import util' | \ + $(STAGING_DIR_HOST)/bin/python3 -)) $(eval $(call TestHostCommand,python3-stdlib, \ Please install the Python3 stdlib module, \