@@ -10345,34 +10345,34 @@ python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
1034510345python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
1034610346python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
1034710347# Reject unsupported Python versions as soon as practical.
10348- if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6 ; then
10349- as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
10348+ if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 7 ; then
10349+ as_fn_error $? "Python version $python_version is too old (version 2.7 or later is required)" "$LINENO" 5
1035010350fi
1035110351
10352- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
10353- $as_echo_n "checking for Python distutils module... " >&6; }
10354- if "${PYTHON}" -c 'import distutils ' 2>&5
10352+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10353+ $as_echo_n "checking for Python sysconfig module... " >&6; }
10354+ if "${PYTHON}" -c 'import sysconfig ' 2>&5
1035510355then
1035610356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1035710357$as_echo "yes" >&6; }
1035810358else
1035910359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1036010360$as_echo "no" >&6; }
10361- as_fn_error $? "distutils module not found" "$LINENO" 5
10361+ as_fn_error $? "sysconfig module not found" "$LINENO" 5
1036210362fi
1036310363
1036410364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
1036510365$as_echo_n "checking Python configuration directory... " >&6; }
10366- python_configdir=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LIBPL'))))"`
10366+ python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
1036710367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
1036810368$as_echo "$python_configdir" >&6; }
1036910369
1037010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
1037110371$as_echo_n "checking Python include directories... " >&6; }
1037210372python_includespec=`${PYTHON} -c "
10373- import distutils. sysconfig
10374- a = '-I' + distutils. sysconfig.get_python_inc(False )
10375- b = '-I' + distutils. sysconfig.get_python_inc(True )
10373+ import sysconfig
10374+ a = '-I' + sysconfig.get_path('include' )
10375+ b = '-I' + sysconfig.get_path('platinclude' )
1037610376if a == b:
1037710377 print(a)
1037810378else:
@@ -10388,8 +10388,8 @@ $as_echo "$python_includespec" >&6; }
1038810388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
1038910389$as_echo_n "checking how to link an embedded Python application... " >&6; }
1039010390
10391- python_libdir=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LIBDIR'))))"`
10392- python_ldlibrary=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LDLIBRARY'))))"`
10391+ python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10392+ python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
1039310393
1039410394# If LDLIBRARY exists and has a shlib extension, use it verbatim.
1039510395ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
@@ -10401,11 +10401,11 @@ else
1040110401 # Otherwise, guess the base name of the shlib.
1040210402 # LDVERSION was added in Python 3.2, before that use VERSION,
1040310403 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10404- python_ldversion=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LDVERSION'))))"`
10404+ python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
1040510405 if test x"${python_ldversion}" != x""; then
1040610406 ldlibrary="python${python_ldversion}"
1040710407 else
10408- python_version_var=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('VERSION'))))"`
10408+ python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
1040910409 if test x"${python_version_var}" != x""; then
1041010410 ldlibrary="python${python_version_var}"
1041110411 else
@@ -10465,7 +10465,7 @@ PL/Python." "$LINENO" 5
1046510465fi
1046610466python_libspec="-L${python_libdir} -l${ldlibrary}"
1046710467
10468- python_additional_libs=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10468+ python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
1046910469
1047010470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
1047110471$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
0 commit comments