MonetDB: Oct2012 - configure fixes for if there is no python2 bi...

Fabian Groffen fabian at monetdb.org
Tue Dec 11 16:08:43 CET 2012


On 11-12-2012 15:59:04 +0100, Sjoerd Mullender wrote:
> Changeset: fb7305c917ec for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fb7305c917ec
> Modified Files:
> 	configure.ag
> Branch: Oct2012
> Log Message:
> 
> configure fixes for if there is no python2 binary, but python is version 2.
> Also fixed a syntax error.

> +AC_PATH_PROG(PYTHON,python,no,$PATH)
> +PYTHON_MAJ=
> +if test "x$PYTHON" != xno; then
> +	AC_MSG_CHECKING([major version of $PYTHON])
> +	case "`"$PYTHON" -V 2>&1`" in
> +		"Python 2."[[67]]*)  # older Pythons don't get Python3 syntax
> +			PYTHON_MAJ=2
> +			case "$have_python2" in
> +			yes|auto)
> +				have_python2=yes
> +				PYTHON2="$PYTHON"

Because PYTHON2=/path/to/python here, we no longer check for python2 which is
preferably over "/path/to/python", since it contains a version.  The
active python can change over updates or preferences of the user.

Perhaps (something like) the following would be enough?

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1164,7 +1164,7 @@ fi
 
 if test "x$have_python2" != xno; then
        if test x$cross_compiling != xyes; then
-               AC_PATH_PROG(PYTHON2,$PYTHON2,no,$PATH)
+               AC_PATH_PROG(PYTHON2,python2,no,$PATH)
                if test "x$PYTHON2" = xno; then
                        if ( test "x$have_python2" = xyes || test "x$have_python2" = xauto ) && test "x$PYTHON_MAJ" = x2; then
                                PYTHON2="$PYTHON"
@@ -1220,7 +1220,7 @@ AC_SUBST(PYTHON2_LIBDIR)
 
 if test "x$have_python3" != xno; then
        if test x$cross_compiling != xyes; then
-               AC_PATH_PROG(PYTHON3,$PYTHON3,no,$PATH)
+               AC_PATH_PROG(PYTHON3,python3,no,$PATH)
                if test "x$PYTHON3" = xno; then
                        if ( test "x$have_python3" = xyes || test "x$have_python3" = xauto ) && test "x$PYTHON_MAJ" = x3; then
                                PYTHON3="$PYTHON"


-- 
Fabian Groffen                              fabian at monetdb.org
column-store pioneer               http://www.monetdb.org/Home
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: Digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20121211/8d6e0071/attachment.sig>
-------------- next part --------------
_______________________________________________
developers-list mailing list
developers-list at monetdb.org
http://mail.monetdb.org/mailman/listinfo/developers-list


More information about the developers-list mailing list