./configure without python3?

Martin Schwenke martin at meltin.net
Mon Dec 10 23:40:07 UTC 2018


On Tue, 11 Dec 2018 00:08:59 +0100, Stefan Metzmacher <metze at samba.org>
wrote:

> Am 10.12.18 um 23:08 schrieb Martin Schwenke via samba-technical:
> > Unfortunately, I haven't been following the python3 changes closely, so
> > a quick question...
> > 
> > Last night all of our local CI jobs fell over because python3 was not
> > found in ./configure:
> > 
> >   ${PYTHON:=python3} $WAF configure "$@" || exit 1
> > 
> > None of our jobs set $PYTHON.
> > 
> > I just wanted to check that we really want ./configure to fall over
> > when python3 is not available, rather than falling back to python[2],
> > as in:
> > 
> >   if [ -z "$PYTHON" ] ; then
> >     if type python3 >/dev/null 2>&1 ; then
> >       export PYTHON="python3"
> >     elif type python >/dev/null 2>&1 ; then
> >       export PYTHON="python"
> >     else
> >       echo "$0: error, can't find python3 or python"
> >       exit 1
> >     fi
> >   fi
> >   $WAF configure "$@" || exit 1
> > 
> > Thanks...  
> 
> I think we want something like this (but make it /bin/sh compatible)

I can't see what in the above isn't POSIX shell.

> and we need to make sure the Makefile uses the same
> as configure did. Maybe craeating a Makefile from Makefile.in
> before calling $WAF configure "$@" || exit 1

How about we do something similar to WAF=... ?

We could set

  PYTHON=buildtools/python.sh

if it isn't set?

Then that script could choose the best available version...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181211/1d11367d/attachment.sig>


More information about the samba-technical mailing list