[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: allow the 'python' used to run to be configured

From: Daniel Kiper
Subject: Re: Patch: allow the 'python' used to run to be configured
Date: Mon, 9 Jul 2018 11:25:47 +0200
User-agent: Mutt/1.3.28i

On Fri, Jul 06, 2018 at 01:19:18PM -0700, Adam Williamson wrote:
> On Fri, 2018-07-06 at 19:25 +0200, Daniel Kiper wrote:
> > On Wed, Jul 04, 2018 at 10:08:53AM -0700, Adam Williamson wrote:
> > > is python2/3-agnostic, but there's no way to cause it
> > > to be run with any interpreter other than 'python', it's just
> > > hard-coded into Makefile.common that way. Adjust that to allow
> > > a make variable PYTHONBIN to be set to the desired interpreter.
> > > This will make it easier in situations where we specifically
> > > want to build with 'python2' or 'python3' or whatever.
> > >
> > > Signed-off-by: Adam Williamson <address@hidden>
> >
> > Thanks for the patch. However, I think that the configure should find
> > correct python binary and set PYTHON variable (instead of PYTHONBIN)
> > in the Makefile (good example is BUILD_CC variable in
> That's possible, but it depends what you mean by "correct", doesn't it?
> There could be many python interpreters installed on a system; which
> are we to assume is "correct"?

Yep. I think that we should start with python name and if that does not
work then look for another common names.

> We could make it configurable with some sort of default heuristic, I
> guess, I was just going for a simple patch approximately in line with
> what was done for for now. (And I wouldn't want to reinvent
> python interpreter discovery, which has been invented enough times
> already; if we were to go that route it'd probably make sense to use an
> existing autoconf extension or something).

This is what I was thinking about. Reinventing the wheel does not make sense.

> > And there are more references to the python binary in other makefiles
> > which should be fixed too.
> I can't find any...could those perhaps be in files generated from the
> ones actually in the git repo? I grepped the whole of a clean git
> checkout for 'python' and these were all I found, and with this patch
> (as mentioned) I can successfully build grub using python3 on a system
> with no 'python' executable at all.

Ugh... My fault, sorry. It looks that "make distclean" does not work well.
It have to be fixed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]