changeset 24675:ae30a87aafd3 v8.2.2876

patch 8.2.2876: configure cannot detect Python 3.10 Commit: https://github.com/vim/vim/commit/23c0192166760b0d73bd39252ca72e3cfe596f6e Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 21 11:43:58 2021 +0200 patch 8.2.2876: configure cannot detect Python 3.10 Problem: Configure cannot detect Python 3.10. Solution: Use sys.version_info. (closes https://github.com/vim/vim/issues/8233)
author Bram Moolenaar <Bram@vim.org>
date Fri, 21 May 2021 11:45:03 +0200
parents 228af8f5523b
children 256fdb5f7252
files src/auto/configure src/configure.ac src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -6673,7 +6673,7 @@ if ${vi_cv_var_python3_version+:} false;
   $as_echo_n "(cached) " >&6
 else
   vi_cv_var_python3_version=`
-          ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
+          ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1436,7 +1436,7 @@ if test "$enable_python3interp" = "yes" 
     dnl -- get its version number
     AC_CACHE_CHECK(Python version,vi_cv_var_python3_version,
     [[vi_cv_var_python3_version=`
-          ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
+          ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
     ]])
 
     dnl -- it must be at least version 3
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2876,
+/**/
     2875,
 /**/
     2874,