From patchwork Tue Sep 30 08:17:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 394801 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E030614010C for ; Tue, 30 Sep 2014 18:17:50 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 894E94B610; Tue, 30 Sep 2014 10:17:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1-YwVBsWKtM6; Tue, 30 Sep 2014 10:17:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB74D4B608; Tue, 30 Sep 2014 10:17:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7F3D64B608 for ; Tue, 30 Sep 2014 10:17:41 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CH2LRywu0B8B for ; Tue, 30 Sep 2014 10:17:41 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id 58E244B606 for ; Tue, 30 Sep 2014 10:17:38 +0200 (CEST) Received: from frontend02.mail.m-online.net (unknown [192.168.8.183]) by mail-out.m-online.net (Postfix) with ESMTP id 3j6YPG0lppz3hjMJ; Tue, 30 Sep 2014 10:17:35 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.6.69]) by mail.m-online.net (Postfix) with ESMTP id 3j6YPC1Fx7zw1Zc; Tue, 30 Sep 2014 10:17:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.184]) by localhost (dynscan2.mail.m-online.net [192.168.6.69]) (amavisd-new, port 10024) with ESMTP id Zk1he4mG8ktH; Tue, 30 Sep 2014 10:17:33 +0200 (CEST) X-Auth-Info: EuTAhKty8jb1/fhwxF4bH3kPrn1jTwD4RyMahhWG9SE= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Tue, 30 Sep 2014 10:17:32 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 7516C1AABE5; Tue, 30 Sep 2014 10:17:31 +0200 (CEST) Received: by gemini.denx.de (Postfix, from userid 500) id 5E2A9383B95; Tue, 30 Sep 2014 10:17:31 +0200 (MEST) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Tue, 30 Sep 2014 10:17:22 +0200 Message-Id: <1412065042-572-1-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.9.3 Subject: [U-Boot] [RFC PATCH] genboardscfg.py: use Python2 from default path X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Instead of searching for Python2 in $PATH, use the one installed by the system (i. e. /usr/bin/python2). This prevents failures like this: -> ./MAKEALL m53evk Traceback (most recent call last): File "tools/genboardscfg.py", line 19, in import fnmatch ImportError: No module named fnmatch Failed to generate boards.cfg This happens for example with all but the most recent versions of Yocto based tool chains (inclusing all currently existing versions of the ELDK), which provide a python2 binary in SYSROOT/usr/bin/python2, but do not include the "fnmatch" module. By using the system installed Python interpreter, the user is able to install any missing modules himself, without need to patch and rebuild the whole tool chain. Signed-off-by: Wolfgang Denk Cc: Masahiro Yamada --- tools/genboardscfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py index 23c956b..fa0f49f 100755 --- a/tools/genboardscfg.py +++ b/tools/genboardscfg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/python2 # # Author: Masahiro Yamada #