]> granicus.if.org Git - vim/commitdiff
patch 8.2.2876: configure cannot detect Python 3.10 v8.2.2876
authorBram Moolenaar <Bram@vim.org>
Fri, 21 May 2021 09:43:58 +0000 (11:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 21 May 2021 09:43:58 +0000 (11:43 +0200)
Problem:    Configure cannot detect Python 3.10.
Solution:   Use sys.version_info. (closes #8233)

src/auto/configure
src/configure.ac
src/version.c

index 0b423a657755e395f8fe63eae9c3e6b9c87852d6..5702a2171885ea356ffe7428ab58dd8114e1118f 100755 (executable)
@@ -6673,7 +6673,7 @@ if ${vi_cv_var_python3_version+:} false; then :
   $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
index cc8d61f7f8b7441687bf9b8671c84b1df22cd1ed..2db04496ff1d7f7ec26384cd16c508f8f83005b3 100644 (file)
@@ -1436,7 +1436,7 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
     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
index d593a2207360f97ed093cc9c7ab32e323d55a7fb..ca18b679f68b5aca3448258f6df940df3d071d6c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2876,
 /**/
     2875,
 /**/