From patchwork Fri Feb 22 20:37:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1047119 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 445jpj1WmKz9sBR for ; Sat, 23 Feb 2019 07:38:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E31808742D; Fri, 22 Feb 2019 20:38:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lPqCdQd-uXpC; Fri, 22 Feb 2019 20:38:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id F05A487335; Fri, 22 Feb 2019 20:38:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EFBB71BF5AA for ; Fri, 22 Feb 2019 20:38:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id ED0E387A80 for ; Fri, 22 Feb 2019 20:38:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8ITYhF55M2EO for ; Fri, 22 Feb 2019 20:38:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7645487A5A for ; Fri, 22 Feb 2019 20:38:12 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 13E3D2400E6 for ; Fri, 22 Feb 2019 21:38:09 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 445jpP5nzWz9rxg for ; Fri, 22 Feb 2019 21:38:05 +0100 (CET) Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id epAW5ZfxPaNN; Fri, 22 Feb 2019 21:38:04 +0100 (CET) Received: from nzxt.fritz.box (port-92-193-239-172.dynamic.qsc.de [92.193.239.172]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Fri, 22 Feb 2019 21:38:04 +0100 (CET) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Fri, 22 Feb 2019 21:37:56 +0100 Message-Id: <20190222203756.8795-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/ninja: enforce Python3 on the host X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- package/ninja/ninja.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/ninja/ninja.mk b/package/ninja/ninja.mk index 9d6f30e9fe..42dc3cb567 100644 --- a/package/ninja/ninja.mk +++ b/package/ninja/ninja.mk @@ -9,7 +9,10 @@ NINJA_SITE = $(call github,ninja-build,ninja,$(NINJA_VERSION)) NINJA_LICENSE = Apache-2.0 NINJA_LICENSE_FILES = COPYING -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 define HOST_NINJA_BUILD_CMDS (cd $(@D); ./configure.py --bootstrap)