summaryrefslogtreecommitdiff
path: root/src/auto
diff options
context:
space:
mode:
authorZdenek Dohnal <zdohnal@redhat.com>2021-06-10 18:50:55 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-10 18:50:55 +0200
commit31e299c08f250b126b2c2c0ecce12ee563b70fdc (patch)
treec6a5e5a7b431892a7f9cdefcb50b647ad13971c5 /src/auto
parenta42e6e0082a6d564dbfa55317d4a698ac12ae898 (diff)
downloadvim-git-31e299c08f250b126b2c2c0ecce12ee563b70fdc.tar.gz
patch 8.2.2970: Python configure check uses deprecated commandv8.2.2970
Problem: Python configure check uses deprecated command. Solution: Use sysconfig instead of distutils if possible. (Zdenek Dohnal, closes #8354)
Diffstat (limited to 'src/auto')
-rwxr-xr-xsrc/auto/configure5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/auto/configure b/src/auto/configure
index 5702a2171..7ecc40ca5 100755
--- 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