diff --git a/configure b/configure index 0694dce86..d89e4413a 100755 --- a/configure +++ b/configure @@ -17734,7 +17734,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # if test ! -z "$PYTHON_VERSION"; then - if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then + badversion="no" + if test "$PYTHON_VERSION_MAJOR" -lt 2; then + badversion="yes" + fi + if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then + badversion="yes" + fi + if test "$badversion" = "yes"; then as_fn_error $? "Python version >= 2.4.0 is required" "$LINENO" 5 fi diff --git a/configure.ac b/configure.ac index 2c7583310..c7d3a08f1 100644 --- a/configure.ac +++ b/configure.ac @@ -734,7 +734,14 @@ if test x_$ub_test_python != x_no; then ac_save_LIBS="$LIBS" dnl otherwise AC_PYTHON_DEVEL thrashes $LIBS AC_PYTHON_DEVEL if test ! -z "$PYTHON_VERSION"; then - if test `$PYTHON -c "print('$PYTHON_VERSION' >= '2.4.0')"` = "False"; then + badversion="no" + if test "$PYTHON_VERSION_MAJOR" -lt 2; then + badversion="yes" + fi + if test "$PYTHON_VERSION_MAJOR" -eq 2 -a "$PYTHON_VERSION_MINOR" -lt 4; then + badversion="yes" + fi + if test "$badversion" = "yes"; then AC_MSG_ERROR([Python version >= 2.4.0 is required]) fi diff --git a/doc/Changelog b/doc/Changelog index f8d5b5668..d0db27d62 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 9 January 2023: Wouter - Fix python module install path detection. + - Fix python version detection in configure. 6 January 2023: Wouter - Fix #823: Response change to NODATA for some ANY queries since