File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 18
18
19
19
# _PGAC_CHECK_PYTHON_DIRS
20
20
# -----------------------
21
- # Determine the name of various directories of a given Python installation.
21
+ # Determine the name of various directories of a given Python installation,
22
+ # as well as the Python version.
22
23
AC_DEFUN ( [ _PGAC_CHECK_PYTHON_DIRS] ,
23
24
[ AC_REQUIRE ( [ PGAC_PATH_PYTHON] )
24
25
AC_MSG_CHECKING ( [ for Python distutils module] )
@@ -36,6 +37,11 @@ python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
36
37
python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
37
38
AC_MSG_RESULT ( [ $python_configdir] )
38
39
40
+ # Reject unsupported Python versions as soon as practical.
41
+ if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
42
+ AC_MSG_ERROR ( [ Python version $python_version is too old (version 2.4 or later is required)] )
43
+ fi
44
+
39
45
AC_MSG_CHECKING ( [ Python include directories] )
40
46
python_includespec=`${PYTHON} -c "
41
47
import distutils.sysconfig
Original file line number Diff line number Diff line change @@ -7594,6 +7594,11 @@ python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filte
7594
7594
{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $python_configdir " >&5
7595
7595
$as_echo " $python_configdir " >&6 ; }
7596
7596
7597
+ # Reject unsupported Python versions as soon as practical.
7598
+ if test " $python_majorversion " -lt 3 -a " $python_minorversion " -lt 4; then
7599
+ as_fn_error $? " Python version $python_version is too old (version 2.4 or later is required)" " $LINENO " 5
7600
+ fi
7601
+
7597
7602
{ $as_echo " $as_me :${as_lineno-$LINENO } : checking Python include directories" >&5
7598
7603
$as_echo_n " checking Python include directories... " >&6 ; }
7599
7604
python_includespec=` ${PYTHON} -c "
@@ -7699,9 +7704,6 @@ $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7699
7704
7700
7705
7701
7706
7702
- if test " $python_majorversion " -lt 3 -a " $python_minorversion " -lt 4; then
7703
- as_fn_error $? " Python version $python_version is too old (version 2.4 or later is required)" " $LINENO " 5
7704
- fi
7705
7707
fi
7706
7708
7707
7709
if test " $cross_compiling " = yes && test -z " $with_system_tzdata " ; then
Original file line number Diff line number Diff line change 927
927
if test "$with_python" = yes; then
928
928
PGAC_PATH_PYTHON
929
929
PGAC_CHECK_PYTHON_EMBED_SETUP
930
- if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
931
- AC_MSG_ERROR([Python version $python_version is too old (version 2.4 or later is required)])
932
- fi
933
930
fi
934
931
935
932
if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
You can’t perform that action at this time.
0 commit comments