Bug 601676 - Configure should reject python3.

This commit is contained in:
Jason Orendorff 2010-12-10 10:09:13 -06:00
Родитель 8b066fa5d9
Коммит c4797ba174
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -1915,13 +1915,13 @@ case "$host" in
esac
dnl We require version 2.5 or newer of Python to build.
AC_MSG_CHECKING([for minimum required Python version >= $PYTHON_VERSION])
AC_MSG_CHECKING([for Python version >= $PYTHON_VERSION but not 3.x])
changequote(,)
$PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1])" $PYTHON_VERSION
$PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.')" $PYTHON_VERSION
_python_res=$?
changequote([,])
if test "$_python_res" != 0; then
AC_MSG_ERROR([Python $PYTHON_VERSION or higher is required.])
AC_MSG_ERROR([Python $PYTHON_VERSION or higher (but not Python 3.x) is required.])
fi
AC_MSG_RESULT([yes])

Просмотреть файл

@ -990,7 +990,7 @@ else
AC_MSG_RESULT([yes])
fi
MOZ_PATH_PROGS(PYTHON, $PYTHON python2.6 python2.5 python2.4 python)
MOZ_PATH_PROGS(PYTHON, $PYTHON python2.7 python2.6 python2.5 python)
if test -z "$PYTHON"; then
AC_MSG_ERROR([python was not found in \$PATH])
fi
@ -1904,13 +1904,13 @@ esac
dnl We require version 2.4 or newer of Python to build,
dnl and 2.5 or newer on Windows.
AC_MSG_CHECKING([for minimum required Python version >= $PYTHON_VERSION])
AC_MSG_CHECKING([for Python version >= $PYTHON_VERSION but not 3.x])
changequote(,)
$PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1])" $PYTHON_VERSION
$PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.')" $PYTHON_VERSION
_python_res=$?
changequote([,])
if test "$_python_res" != 0; then
AC_MSG_ERROR([Python $PYTHON_VERSION or higher is required.])
AC_MSG_ERROR([Python $PYTHON_VERSION or higher (but not Python 3.x) is required.])
fi
AC_MSG_RESULT([yes])