prereq-build: limit python distutils check to <v3.12

v3.12 won't have it anymore.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16699
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 8191c8980f)
Link: https://github.com/openwrt/openwrt/pull/19513
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Andre Heider 2023-01-09 16:38:05 +01:00 committed by Hauke Mehrtens
parent ba84c3640b
commit 235d6eec75
1 changed files with 2 additions and 1 deletions

View File

@ -197,7 +197,8 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
$(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, \