]> granicus.if.org Git - vim/commitdiff
patch 8.2.2970: Python configure check uses deprecated command v8.2.2970
authorZdenek Dohnal <zdohnal@redhat.com>
Thu, 10 Jun 2021 16:50:55 +0000 (18:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 10 Jun 2021 16:50:55 +0000 (18:50 +0200)
Problem:    Python configure check uses deprecated command.
Solution:   Use sysconfig instead of distutils if possible. (Zdenek Dohnal,
            closes #8354)

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

index 5702a2171885ea356ffe7428ab58dd8114e1118f..7ecc40ca5120a11c9206ed0e5847d323c59a68cc 100755 (executable)
@@ -6755,7 +6755,10 @@ else
 
        vi_cv_path_python3_conf=
        config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
-       d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+       d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
+       if test "x$d" = "x"; then
+         d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+       fi
        if test -d "$d" && test -f "$d/config.c"; then
          vi_cv_path_python3_conf="$d"
        else
index 2db04496ff1d7f7ec26384cd16c508f8f83005b3..9810ea1fc4655a49ad28eed2d76ce3d2831baad8 100644 (file)
@@ -1487,7 +1487,10 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
       [
        vi_cv_path_python3_conf=
        config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
-       d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+       d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
+       if test "x$d" = "x"; then
+         d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+       fi
        if test -d "$d" && test -f "$d/config.c"; then
          vi_cv_path_python3_conf="$d"
        else
index 055179cd2d83e733169cb749e82683778608718a..6286581995f63a041a0d7362e574bc91f8d94421 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2970,
 /**/
     2969,
 /**/