compatible with python2 and python3 (#1145)

* compatible with python2 and python3.

* fix python version check in configure of qemu.

* allow python-2.4.

* add credit.
This commit is contained in:
Chen Huitao
2019-09-20 17:23:12 +08:00
committed by Nguyen Anh Quynh
parent c46e745338
commit f4cc35a24a
6 changed files with 52 additions and 36 deletions

3
qemu/configure vendored
View File

@ -554,9 +554,8 @@ fi
# Note that if the Python conditional here evaluates True we will exit
# with status 1 which is a shell 'false' value.
if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4))'; then
error_exit "Cannot use '$python', Python 2.4 or later is required." \
"Note that Python 3 or later is not yet supported." \
"Use --python=/path/to/python to specify a supported Python."
fi