[openwrt/openwrt] build: prereq detect Python 3.10 for `python3` binary

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 10 07:27:02 PDT 2021


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/56ea2bf2eec431ccd3c566190a444ad63db39b65

commit 56ea2bf2eec431ccd3c566190a444ad63db39b65
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sat Oct 9 23:09:46 2021 -1000

    build: prereq detect Python 3.10 for `python3` binary
    
    While the binary `python3.10` is correctly detected by the build system
    the default `python3` binary is currently not detected if pointing to a
    Python 3.10 installation.
    
    Fix this by extending the grep regex.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/prereq-build.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index e1993444f7..ce6873cf52 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -162,7 +162,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
 	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]\.?'))
+	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
 
 $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
 	python3.10 -V 2>&1 | grep 'Python 3', \
@@ -170,7 +170,7 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
 	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]\.?'))
+	python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
 
 $(eval $(call TestHostCommand,python3-distutils, \
 	Please install the Python3 distutils module, \



More information about the lede-commits mailing list