Hi,

On Tue, Apr 15, 2014 at 11:19:24AM +0200, Alexander Aring wrote:
> Signed-off-by: Alexander Aring <[email protected]>
> ---
>  configure.ac | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 2a97944..efc67ba 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -304,6 +304,18 @@ AC_ARG_WITH(python, AS_HELP_STRING([--with-python],[name 
> of the python executabl
>       AC_PATH_PROGS(PYTHON, python2.7 python2.6 python)
>       AC_SUBST(PYTHON)
>      ])
> +
> +dnl
> +dnl Check for python 2.x
> +dnl
> +AC_MSG_CHECKING([check for python major version])
> +PYTHON_MAJOR_VERSION=`$PYTHON -c "import sys; print(sys.version_info[[0]])" 
> 2> /dev/null`
> +case "$PYTHON_MAJOR_VERSION" in
> +2) ;;
> +*)   AC_MSG_ERROR([we need python version 2.x but found 
> $PYTHON_MAJOR_VERSION.x]) ;;
> +esac

some little note here. I know we don't need a switch case here but it's
good to handle others python major versions in the future.

Then maybe python 4.x is incompatible with python 3.x like the current
situation with python 3.x and python 2.x

- Alex

-- 
ptxdist mailing list
[email protected]

Reply via email to