# HG changeset patch # User Bram Moolenaar # Date 1623344403 -7200 # Node ID db4afe19285d878a9e71443c387ecf1745477e31 # Parent d88997236cab0c25c135998a2e24e9bd0e834952 patch 8.2.2970: Python configure check uses deprecated command Commit: https://github.com/vim/vim/commit/31e299c08f250b126b2c2c0ecce12ee563b70fdc Author: Zdenek Dohnal Date: Thu Jun 10 18:50:55 2021 +0200 patch 8.2.2970: Python configure check uses deprecated command Problem: Python configure check uses deprecated command. Solution: Use sysconfig instead of distutils if possible. (Zdenek Dohnal, closes #8354) diff --git a/src/auto/configure b/src/auto/configure --- a/src/auto/configure +++ b/src/auto/configure @@ -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 diff --git a/src/configure.ac b/src/configure.ac --- a/src/configure.ac +++ b/src/configure.ac @@ -1487,7 +1487,10 @@ if test "$enable_python3interp" = "yes" [ 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 diff --git a/src/version.c b/src/version.c --- 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 */ /**/ + 2970, +/**/ 2969, /**/ 2968,