From: Adam Williamson <awilliam@redhat.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: pjones@redhat.com, grub-devel@gnu.org
Subject: Re: Patch: allow the 'python' used to run gentpl.py to be configured
Date: Fri, 06 Jul 2018 13:19:18 -0700	[thread overview]
Message-ID: <dac4a38bfa0b245da2d2bbbc197d4861c2907b05.camel@redhat.com> (raw)
In-Reply-To: <20180706172545.GA14342@router-fw-old.local.net-space.pl>
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:
> > gentpl.py 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 <awilliam@redhat.com>
> 
> 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 Makefile.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"?
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 autogen.sh 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).
> 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.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net
next prev parent reply	other threads:[~2018-07-06 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 17:08 Patch: allow the 'python' used to run gentpl.py to be configured Adam Williamson
2018-07-06 17:25 ` Daniel Kiper
2018-07-06 20:19   ` Adam Williamson [this message]
2018-07-09  9:25     ` Daniel Kiper
2018-07-17 19:35     ` Adam Williamson
2018-09-14  4:04       ` Adam Williamson
2018-09-14 10:02         ` Daniel Kiper
2018-09-19 12:43       ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=dac4a38bfa0b245da2d2bbbc197d4861c2907b05.camel@redhat.com \
    --to=awilliam@redhat.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    --cc=pjones@redhat.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).