All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/ninja: enforce Python3 on the host
Date: Tue, 7 May 2019 23:07:35 +0200	[thread overview]
Message-ID: <20190507230735.0a489f73@windsurf> (raw)
In-Reply-To: <20190222203756.8795-1-joerg.krause@embedded.rocks>

Hello,

On Fri, 22 Feb 2019 21:37:56 +0100
J?rg Krause <joerg.krause@embedded.rocks> wrote:

> The current logic selects Python3 for the host only if Python3 is
> selected for the target, otherwise it selects Python2.
> 
> As Meson, the only package infrastructure using ninja, needs Python3, it is
> desirable to also depend on Python3 on the host for the ninja host
> package.
> 
> Otherwise, if no Python interpreter is selected for the target, both
> Python2 and Python3 are build for the host, which is time consuming
> without any benefit.
> 
> For example when building libmpdclient (and all its target and host
> dependencies) the actual elapsed time for is reduced from around 286s to 207s
> as reported by `time -p make clean all`.
> 
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>

I think this is a good idea, but...

> -HOST_NINJA_DEPENDENCIES = $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
> +# Enforce Python3 on the host, to prevent building Python2 and Python3 when
> +# using packages using the Meson infrastructure and not having any Python
> +# interperter selected for the target.
> +HOST_NINJA_NEEDS_HOST_PYTHON = python3

This definitely cannot be the right change: <pkg>_NEEDS_HOST_PYTHON
only makes sense for packages using the python-package infrastructure,
but Ninja is using the generic-package infrastructure. So basically,
the line you have added does not do anything at all, and it only works
by chance because host-python3 was already built before host-ninja by
some other package.

I think the right change is to just do:

HOST_NINJA_DEPENDENCIES = host-python3

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      parent reply	other threads:[~2019-05-07 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 20:37 [Buildroot] [PATCH] package/ninja: enforce Python3 on the host Jörg Krause
2019-02-28 14:30 ` Adam Duskett
2019-05-07 21:07 ` Thomas Petazzoni [this message]

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=20190507230735.0a489f73@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.