[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Require Python 2.0 or later in autogen.sh and configure

From: David James <james82_at_gmail.com>
Date: 2005-08-25 20:11:49 CEST

On 8/23/05, Daniel Rall <dlr@finemaltcoding.com> wrote:
> On Mon, 22 Aug 2005, David James wrote:
> ...
> > This patch updates autogen.sh and configure to look for Python in the
> > following locations (in order) for Python 2.0 or better: $PYTHON2,
> > $PYTHON, python, python2
>
> This change looks good, +1.
Thank you very much! Committed in r15906. More details below.

> > +for x in "$PYTHON2" "$PYTHON" python python2; do
> > + DETECT_PYTHON2="import sys;sys.exit((sys.hexversion < $VERSION) and 1 or 0)"
> > + if "$x" -c "$DETECT_PYTHON2" >/dev/null 2>/dev/null; then
> > + echo $x
> > + exit 0
> > + fi
> > +done
> > +exit 1
>
> How about $interpreter or $py_interp or something instead of $x?
I've used "$pypath".

> > --- autogen.sh (revision 15884)
> > +++ autogen.sh (working copy)
> > @@ -65,33 +65,33 @@
> > #
> > # Note: this dependency on Python is fine: only SVN developers use autogen.sh
> > # and we can state that dev people need Python on their machine. Note
> > -# that running gen-make.py requires Python 1.X or newer.
> > +# that running gen-make.py requires Python 2.X or newer.
> >
> > -OK=`python -c 'print "OK"'`
> > -if test "${OK}" != "OK" ; then
> > - echo "Python check failed, make sure python is installed and on the PATH"
> > +PYTHON=`./build/find_python.sh`
>
> You could put double quotes around the backticks if you want to support
> spaces in that path for poor Bourne shell interpreters.
Fixed. Thanks!

> > +if test -z "$PYTHON"; then
> > + echo "Python check failed, make sure python 2.x is installed and on the PATH"
> > exit 1
> > fi
>
> This is a fatal error for autogen.sh. If $PYTHON or $PYTHON2 are also picked
> up, how about mentioning them as well?
Good idea! I've fixed this.

Thanks again!

David

-- 
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 25 20:12:29 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.