From 0bf3c3755a8b01595dd4221e25d3efcf94ecd332 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 8 Aug 2019 17:16:17 -0400 Subject: [PATCH] Deprecate Python 2 support Python 2 will reach end of life in January 1 2020. Declare it as deprecated. Backports commit e5abf59eae5990296c243202f95f801495c52e76 from qemu --- qemu/configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qemu/configure b/qemu/configure index ebf6c1cf..b71e2a79 100755 --- a/qemu/configure +++ b/qemu/configure @@ -1472,6 +1472,14 @@ if test "$supported_os" = "no"; then echo "us upstream at qemu-devel@nongnu.org." 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 < (3,0))'; then + echo + echo "warning: Python 2 support is deprecated" >&2 + echo "warning: Python 3 will be required for building future versions of QEMU" >&2 +fi + config_host_mak="config-host.mak" echo "# Automatically generated by configure - do not modify" > $config_host_mak