提交 e120d449 编写于 作者: S Stefan Hajnoczi

configure: check for supported Python 2.x versions

The tracetool code requires Python 2.4, which was released in 2004.
Check for a supported Python version so we can give a clear error
message.
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
上级 9943e0ec
...@@ -1239,9 +1239,10 @@ fi ...@@ -1239,9 +1239,10 @@ fi
# Note that if the Python conditional here evaluates True we will exit # Note that if the Python conditional here evaluates True we will exit
# with status 1 which is a shell 'false' value. # with status 1 which is a shell 'false' value.
if ! "$python" -c 'import sys; sys.exit(sys.version_info[0] >= 3)'; then if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_info >= (3,))'; then
echo "Python 2 required but '$python' is version 3 or better." echo "Cannot use '$python', Python 2.4 or later is required."
echo "Use --python=/path/to/python to specify a Python 2." echo "Note that Python 3 or later is not yet supported."
echo "Use --python=/path/to/python to specify a supported Python."
exit 1 exit 1
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册