From 5aa0d9354005735ca87215fe0e210a9748663ddc Mon Sep 17 00:00:00 2001 From: Sean Koyama Date: Wed, 27 Sep 2023 13:04:33 -0700 Subject: [PATCH] fix python library for 3.10+ (#48) use sed to filter out major version and compare minor versions directly --- config/x_ac_python.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/x_ac_python.m4 b/config/x_ac_python.m4 index e34fa51..fddd9b6 100644 --- a/config/x_ac_python.m4 +++ b/config/x_ac_python.m4 @@ -38,8 +38,9 @@ AC_DEFUN([X_AC_PYTHON], [ AC_MSG_CHECKING([Python version]) python_version=`$PYTHON -c "import distutils.sysconfig; \ print(distutils.sysconfig.get_python_version());"` + python_minor_version=`echo $python_version | sed 's/.*\.\(.*\)/\1/'` if test $python_version '>' 2.99 ; then - if test $python_version '<' 3.8 ; then + if test $python_minor_version -lt 8 ; then m="m" python_version=$python_version$m else