From patchwork Sat Mar 3 14:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 881041 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ztpdb342Bz9sWm for ; Sun, 4 Mar 2018 01:36:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6A92985884; Sat, 3 Mar 2018 14:36:30 +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 unIhdFwElcfc; Sat, 3 Mar 2018 14:36:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3C1CA847B8; Sat, 3 Mar 2018 14:36:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 010031C0927 for ; Sat, 3 Mar 2018 14:36:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id F01AA22277 for ; Sat, 3 Mar 2018 14:36:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qI2fyuUNV-R9 for ; Sat, 3 Mar 2018 14:36:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by silver.osuosl.org (Postfix) with ESMTP id 7A595220D0 for ; Sat, 3 Mar 2018 14:36:25 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 6FEDA207E9; Sat, 3 Mar 2018 15:36:22 +0100 (CET) Received: from localhost (LFbn-TOU-1-408-85.w86-206.abo.wanadoo.fr [86.206.234.85]) by mail.bootlin.com (Postfix) with ESMTPSA id 253BD20124; Sat, 3 Mar 2018 15:36:22 +0100 (CET) From: Thomas Petazzoni To: Buildroot List , "Yann E. MORIN" Date: Sat, 3 Mar 2018 15:36:20 +0100 Message-Id: <20180303143620.16859-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180303143620.16859-1-thomas.petazzoni@bootlin.com> References: <20180303143620.16859-1-thomas.petazzoni@bootlin.com> Subject: [Buildroot] [PATCH 2/2] support/dependencies/dependencies.sh: check for Python argparse module X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The script support/scripts/check-uniq-files uses the argparse Python module. In most recent Python versions (starting with 2.7), the argparse module is part of the standard library, and we already check for the availability of Python in support/dependencies/dependencies.sh. However, when running on an ancient distribution with Python 2.6, the argparse module is not part of the Python standard library, but available as an external module. Without this module, the build fails, because check-uniq-files, which is used in target-finalize, fails to run. To avoid this failure, this commit adds a check in support/dependencies/dependencies.sh to verify that the argparse module is available. Signed-off-by: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- support/dependencies/dependencies.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 1804e85508..423fed8110 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -288,3 +288,8 @@ if [ -n "$missing_perl_modules" ] ; then echo exit 1 fi + +if ! python -c "import argparse" > /dev/null 2>&1 ; then + echo "Your Python installation is not complete enough: argparse module is missing" + exit 1 +fi