./configure without python3?

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


On Tue, 11 Dec 2018 12:17:16 +1300, Andrew Bartlett
<abartlet at samba.org> wrote:

> On Tue, 2018-12-11 at 09:08 +1100, Martin Schwenke via samba-technical
> wrote:
> > 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 guess it all depends on how depricated you feel python2 is.

I don't think my feelings come into it.  :-D

The build falls over by default on CentOS 7, RHEL 6, FreeBSD 11 and AIX
7.  We either save our (manual installing) users some pain and make it
work if they don't have python3...

> My gut feeling is that we want the current behaviour.  

... or we don't.  :-)

> However, the alternative would need us to have the ./configure script
> rewrite the Makefile (eg an autoconf style Makefile.in -> Makefile) to
> then run waf with the detected $PYTHON.
> 
> Not the end of the world of course, and if you would like us to go that
> way perhaps you could create something that does that?

I think the Makefile.in -> Makefile idea probably adds more fragility
that we don't need... and it is quite a fundamental change that causes
a lot of churn.

I like the suggestion I saw in another reply where someone suggested
using buildtools/python.sh and have that script run the right
version.  ;-)

> I see it is going to be a fun couple of weeks before Chirstmas :-)

These weeks are always fun.  Clearly someone needs to go to a Xmas
party and drink excessively before making the final decision...  :-)

peace & happiness,
martin



More information about the samba-technical mailing list