@@ -10345,38 +10345,31 @@ python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10345
10345
python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10346
10346
python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10347
10347
# 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
10350
10350
fi
10351
10351
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
10355
10355
then
10356
10356
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10357
10357
$as_echo "yes" >&6; }
10358
10358
else
10359
10359
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360
10360
$as_echo "no" >&6; }
10361
- as_fn_error $? "distutils module not found" "$LINENO" 5
10361
+ as_fn_error $? "sysconfig module not found" "$LINENO" 5
10362
10362
fi
10363
10363
10364
10364
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10365
10365
$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'))))"`
10367
10367
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10368
10368
$as_echo "$python_configdir" >&6; }
10369
10369
10370
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
10371
- $as_echo_n "checking Python include directories... " >&6; }
10372
- python_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)
10376
- if a == b:
10377
- print(a)
10378
- else:
10379
- print(a + ' ' + b)"`
10370
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10371
+ $as_echo_n "checking Python include directory... " >&6; }
10372
+ python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10380
10373
if test "$PORTNAME" = win32 ; then
10381
10374
python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10382
10375
fi
@@ -10388,8 +10381,8 @@ $as_echo "$python_includespec" >&6; }
10388
10381
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10389
10382
$as_echo_n "checking how to link an embedded Python application... " >&6; }
10390
10383
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'))))"`
10384
+ python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10385
+ python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10393
10386
10394
10387
# If LDLIBRARY exists and has a shlib extension, use it verbatim.
10395
10388
ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
@@ -10401,11 +10394,11 @@ else
10401
10394
# Otherwise, guess the base name of the shlib.
10402
10395
# LDVERSION was added in Python 3.2, before that use VERSION,
10403
10396
# 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'))))"`
10397
+ python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10405
10398
if test x"${python_ldversion}" != x""; then
10406
10399
ldlibrary="python${python_ldversion}"
10407
10400
else
10408
- python_version_var=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('VERSION'))))"`
10401
+ python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10409
10402
if test x"${python_version_var}" != x""; then
10410
10403
ldlibrary="python${python_version_var}"
10411
10404
else
@@ -10465,7 +10458,7 @@ PL/Python." "$LINENO" 5
10465
10458
fi
10466
10459
python_libspec="-L${python_libdir} -l${ldlibrary}"
10467
10460
10468
- python_additional_libs=`${PYTHON} -c "import distutils. sysconfig; print(' '.join(filter(None,distutils. sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10461
+ python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10469
10462
10470
10463
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10471
10464
$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
0 commit comments