From: Jason Ish Date: Thu, 10 Oct 2019 22:32:21 +0000 (-0600) Subject: configure: fix python major version check on python 2.6 X-Git-Tag: suricata-5.0.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c44f82cf4ce08e0f307a6ce6753049269bb968b4;p=thirdparty%2Fsuricata.git configure: fix python major version check on python 2.6 Python 2.6 doesn't use a named tuple for the version info, instead use the index of the major version which works on Python 2.6 upwards. --- diff --git a/configure.ac b/configure.ac index 0f7abcb303..ef96ddfc2c 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,7 @@ # Get the Python major version. This is only for information # messages displayed during configure. if test "x$HAVE_PYTHON" != "xno"; then - pymv="$($HAVE_PYTHON -c 'import sys; print(sys.version_info.major);')" + pymv="$($HAVE_PYTHON -c 'import sys; print(sys.version_info[[0]]);')" fi # Check for python-distutils (setup).