
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 <module> 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 wd@denx.de Cc: Masahiro Yamada yamada.m@jp.panasonic.com --- 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 yamada.m@jp.panasonic.com #