[U-Boot] [RFC PATCH] genboardscfg.py: use Python2 from default path
Wolfgang Denk
wd at denx.de
Tue Sep 30 13:36:05 CEST 2014
Dear Masahiro,
In message <20140930175820.4A3C.AA925319 at jp.panasonic.com> you wrote:
>
> > 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.
>
> I'd like to regard the root cause of the problem
> as ELDK missing fnmatch module.
Yes, you are right. The problem is caused by the fact that the ELDK
(and other Yocto based tool chains until very recently) provide their
own version of Python2, but without including the fnmatch module.
> I think '/usr/bin/env python' is a general strategy
> to support various platforms where Python might not
> be installed in /usr/bin directory.
> (Buildman and Patman have already adopted this way.)
I agree, and I'm fully aware of potential issues - this is why I
marked this patch as RFC. I'm looking for a solution which works
reasonably well for all.
The situation is, that there is a pretty large number of tool chains
out there (and ectively being used in a number of projects), which
provide their own Python interpreter, but are lacking the fnmatch
module.
As I see it, we have the following options to deal with that:
1) Rewrite genboardscfg.py such that fnmatch is not needed.
I have no idea if this is easily possible or how much effort was
required to do that.
2) Let the script use the system provided Python binary, asuming that
fnmatch is either automatically installed or at least ready
available and with minimal effort installable in all recent Linux
distros.
3) Create fixes so the users can rebuild the tool chains such that
these contain the needed Python modules.
4) For all tool chains that support some form of package management,
build and distribute the missing Python modules as upate package.
5) Fix and rebuild tool chains and distribute new versions of the tool
chains.
My proposed patch choses option 2), as this appears to require the
minimal effort on both the tool chain suppliers and on the U-Boot
side.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Don't worry about people stealing your ideas. If your ideas are any
good, you'll have to ram them down people's throats." - Howard Aiken
More information about the U-Boot
mailing list