Re: MonetDB: Oct2012 - configure fixes for if there is no python2 bi...
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@monetdb.org column-store pioneer http://www.monetdb.org/Home _______________________________________________ developers-list mailing list developers-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/developers-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-12-11 16:08, Fabian Groffen wrote:
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?
I figured, we know that python is version 2 (or 3), so we might as well not go and find another binary that does the same thing. Why is it important that the version number is in the name of the executable? In any case, I'd like to hold off experimentation until after I have been successful in doing a build.
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"
_______________________________________________ developers-list mailing list developers-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/developers-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQCVAwUBUMdXZD7g04AjvIQpAQIptwP/QirmhzHYvCPGLWRBvynYD/ROIjoAn1zZ HQ4HgKL1+td74Rr+p7HBA52iyaldD6LwCCf3kwQzTkyls2BvUuC0NYJIA6q83y1k zJ7rknbZRAHGo7pgljXWTfk24xBFaU8NmFgbOEUArHAC4AIfAZKxHgdf9wVB64kV p4+4lRX4fjc= =3gCY -----END PGP SIGNATURE----- _______________________________________________ developers-list mailing list developers-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/developers-list
On 11-12-2012 16:55:22 +0100, Sjoerd Mullender wrote:
I figured, we know that python is version 2 (or 3), so we might as well not go and find another binary that does the same thing. Why is it important that the version number is in the name of the executable?
% python -V Python 3.3.0 % eselect python set python2.7 % python -V Python 2.7.3 % python2 -V Python 2.7.3 % python3 -V Python 3.3.0
In any case, I'd like to hold off experimentation until after I have been successful in doing a build.
Sorry, I already did some commits :( -- Fabian Groffen fabian@monetdb.org column-store pioneer http://www.monetdb.org/Home _______________________________________________ developers-list mailing list developers-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/developers-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-12-11 16:58, Fabian Groffen wrote:
On 11-12-2012 16:55:22 +0100, Sjoerd Mullender wrote:
I figured, we know that python is version 2 (or 3), so we might as well not go and find another binary that does the same thing. Why is it important that the version number is in the name of the executable?
% python -V Python 3.3.0 % eselect python set python2.7 % python -V Python 2.7.3 % python2 -V Python 2.7.3 % python3 -V Python 3.3.0
In any case, I'd like to hold off experimentation until after I have been successful in doing a build.
Sorry, I already did some commits :(
I noticed, seconds after I sent my message. ;-) - -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQCVAwUBUMdZwT7g04AjvIQpAQJjcgP/RPShpwhP7QrdfYVXPcgrEwqQsLuQMB/A R+1elo0P5Y+9qcSlMgIiykSZ6TXNDiS9vNyLsMzhDxQL9rzzBzYlDrgLZwSCOMGE iIcee3E3nDBoyKyzeUJ/X+95g8OZ6+hzCmEnm1BFHZsMSM41puzuFNanQN559quL NsVbWU21HAM= =KWVq -----END PGP SIGNATURE----- _______________________________________________ developers-list mailing list developers-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/developers-list
participants (2)
-
Fabian Groffen
-
Sjoerd Mullender