Skip to content

Commit a18b6cf

Browse files
authored
build: add support for python3.11 and higher (#10392)
python3.11 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 <[email protected]>
1 parent 5ae0cbf commit a18b6cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/prereq-build.mk

+4-2
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,22 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
157157
$(eval $(call CleanupPython2))
158158

159159
$(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
160+
python3.11 -V 2>&1 | grep 'Python 3', \
160161
python3.10 -V 2>&1 | grep 'Python 3', \
161162
python3.9 -V 2>&1 | grep 'Python 3', \
162163
python3.8 -V 2>&1 | grep 'Python 3', \
163164
python3.7 -V 2>&1 | grep 'Python 3', \
164165
python3.6 -V 2>&1 | grep 'Python 3', \
165-
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
166+
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
166167

167168
$(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
169+
python3.11 -V 2>&1 | grep 'Python 3', \
168170
python3.10 -V 2>&1 | grep 'Python 3', \
169171
python3.9 -V 2>&1 | grep 'Python 3', \
170172
python3.8 -V 2>&1 | grep 'Python 3', \
171173
python3.7 -V 2>&1 | grep 'Python 3', \
172174
python3.6 -V 2>&1 | grep 'Python 3', \
173-
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
175+
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
174176

175177
$(eval $(call TestHostCommand,python3-distutils, \
176178
Please install the Python3 distutils module, \

0 commit comments

Comments
 (0)