[openwrt/openwrt] build: add support for python3.11 and higher

LEDE Commits lede-commits at lists.infradead.org
Sun Aug 14 13:42:27 PDT 2022


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/da7e9b201e6199030d9838ba82b3bd0399ba6d23

commit da7e9b201e6199030d9838ba82b3bd0399ba6d23
Author: Oscar Molnar <oscar at tymscar.com>
AuthorDate: Sat Aug 6 16:13:41 2022 +0100

    build: add support for python3.11 and higher
    
    python3.11 beta is out but fails to run the makefile currently
    this supports python versions from 3.6 to 3.99 with the python3 binary
    it also checks specifically for 3.11 as it is the latest version out
    
    Signed-off-by: Oscar Molnar <oscar at tymscar.com>
    (cherry picked from commit a9e8eec221874e5840d659aed3f68850ff1d9982)
---
 include/prereq-build.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 80d549af39..70e1061680 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -162,20 +162,22 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
 $(eval $(call CleanupPython2))
 
 $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
+	python3.11 -V 2>&1 | grep 'Python 3', \
 	python3.10 -V 2>&1 | grep 'Python 3', \
 	python3.9 -V 2>&1 | grep 'Python 3', \
 	python3.8 -V 2>&1 | grep 'Python 3', \
 	python3.7 -V 2>&1 | grep 'Python 3', \
 	python3.6 -V 2>&1 | grep 'Python 3', \
-	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
+	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
 
 $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
+	python3.11 -V 2>&1 | grep 'Python 3', \
 	python3.10 -V 2>&1 | grep 'Python 3', \
 	python3.9 -V 2>&1 | grep 'Python 3', \
 	python3.8 -V 2>&1 | grep 'Python 3', \
 	python3.7 -V 2>&1 | grep 'Python 3', \
 	python3.6 -V 2>&1 | grep 'Python 3', \
-	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
+	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
 
 $(eval $(call TestHostCommand,python3-distutils, \
 	Please install the Python3 distutils module, \




More information about the lede-commits mailing list