]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure: fix python major version check on python 2.6 4292/head
authorJason Ish <jason.ish@oisf.net>
Thu, 10 Oct 2019 22:32:21 +0000 (16:32 -0600)
committerJason Ish <jason.ish@oisf.net>
Thu, 10 Oct 2019 22:36:08 +0000 (16:36 -0600)
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.

configure.ac

index 0f7abcb3031cd0b1ae902a8a5342c3c11a5f868b..ef96ddfc2c43bb9e09d2ab384197649dce6e7257 100644 (file)
     # 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).