File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1818
1919# _PGAC_CHECK_PYTHON_DIRS
2020# -----------------------
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.
2223AC_DEFUN ( [ _PGAC_CHECK_PYTHON_DIRS] ,
2324[ AC_REQUIRE ( [ PGAC_PATH_PYTHON] )
2425AC_MSG_CHECKING ( [ for Python distutils module] )
@@ -36,6 +37,11 @@ python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
3637python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
3738AC_MSG_RESULT ( [ $python_configdir] )
3839
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+
3945AC_MSG_CHECKING ( [ Python include directories] )
4046python_includespec=`${PYTHON} -c "
4147import 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
75947594{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $python_configdir " >&5
75957595$as_echo " $python_configdir " >&6 ; }
75967596
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+
75977602{ $as_echo " $as_me :${as_lineno-$LINENO } : checking Python include directories" >&5
75987603$as_echo_n " checking Python include directories... " >&6 ; }
75997604python_includespec=` ${PYTHON} -c "
@@ -7699,9 +7704,6 @@ $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
76997704
77007705
77017706
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
77057707fi
77067708
77077709if test " $cross_compiling " = yes && test -z " $with_system_tzdata " ; then
Original file line number Diff line number Diff line change 927927if test "$with_python" = yes; then
928928 PGAC_PATH_PYTHON
929929 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
933930fi
934931
935932if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
You can’t perform that action at this time.
0 commit comments