From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sat, 18 May 2024 16:08:24 +0200
Subject: [PATCH] Fix rlm_python3 for Python 3.10+

https://gitlab.alpinelinux.org/alpine/aports/-/issues/16095

--- a/src/modules/rlm_python3/configure
+++ b/src/modules/rlm_python3/configure
@@ -2951,7 +2951,7 @@
 if ${am_cv_python_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+  am_cv_python_version=`$PYTHON -c "import sys ; print('.'.join(map(str, sys.version_info[:2])))"`
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
 $as_echo "$am_cv_python_version" >&6; }
