Skip to content

Commit 235d6ee

Browse files
dhewghauke
authored andcommitted
prereq-build: limit python distutils check to <v3.12
v3.12 won't have it anymore. Signed-off-by: Andre Heider <[email protected]> Link: openwrt/openwrt#16699 Signed-off-by: Robert Marko <[email protected]> (cherry picked from commit 8191c89) Link: openwrt/openwrt#19513 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent ba84c36 commit 235d6ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/prereq-build.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
197197

198198
$(eval $(call TestHostCommand,python3-distutils, \
199199
Please install the Python3 distutils module, \
200-
$(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util'))
200+
printf 'from sys import version_info\nif version_info < (3, 12):\n\tfrom distutils import util' | \
201+
$(STAGING_DIR_HOST)/bin/python3 -))
201202

202203
$(eval $(call TestHostCommand,python3-stdlib, \
203204
Please install the Python3 stdlib module, \

0 commit comments

Comments
 (0)