[Zope-Coders] Zope 2.7 configure finds wrong Python version
Barry Warsaw
barry@python.org
10 Jun 2003 10:46:26 -0400
On Tue, 2003-06-10 at 10:39, Guido van Rossum wrote:
> With the Zope head (i.e. Zope 2.7-to-be), on my Linux box, when I run
> the configure script, it finds IMO the wrong Python version. Here's
> the relevant output:
>
> Testing for an acceptable Python interpreter...
>
> Python version 2.3b1+ found at /usr/local/bin/python
> Python version 2.1.3 found at /usr/local/bin/python2.1
> Python version 2.2.3+ found at /usr/local/bin/python2.2
> Python version 2.3b1+ found at /usr/local/bin/python2.3
> Python version 1.5.2 found at /usr/bin/python
> Python version 2.2.2 found at /usr/bin/python2
>
> The optimimum Python version (2.2.2) was found at /usr/bin/python2.
>
> The list of Pythons it found is correct, but why would it pick 2.2.2
> over 2.2.3+? (Especially since we now officially require 2.2.3...)
>
> The code for finding a Python version is an inscrutable shell
> function, otherwise I would have looked into it... :-(
Wouldn't it be better to be less magical about the Python executable
search? IOW, configure should include something like --with-python to
be explicit about the Python interpreter to use. Omitting that option
would use the first Python on your $PATH. If for some reason that's not
appropriate (because maybe it's too new or too old) then configure
should complain and quit.
This keeps things simple and explicit and should usually do the right
thing.
-Barry