[U-Boot] [RFC PATCH v2 0/2] Make Python scripts compatible with older versions
Igor Grinberg
grinberg at compulab.co.il
Mon Aug 4 13:21:32 CEST 2014
Hi Masahiro,
On 08/04/14 13:23, Masahiro Yamada wrote:
>
> It was reported by Miao Yan that the kconfig-related Python scripts
> are not working on Python 2.4.
>
> Do we have any consensus in terms of Python version requirement?
>
> This series avoids using "with ... as ..." and "except ... as ..."
> statements. But "with ... as ..." is used everywhere in buildman,
> which means buildman requires at least Python 2.6.
Hmmmm.... Funny... a bit more fire:
-------------------cut----------------------------
$ make cm_t335_defconfig
HOSTCC scripts/basic/fixdep
GEN /home/grinberg/bin-temp/u-boot/Makefile
File "/home/grinberg/git-repo/u-boot/scripts/multiconfig.py", line 344
print "*** Default configuration is based on '%s'" % KBUILD_DEFCONFIG
^
SyntaxError: invalid syntax
make[1]: *** [cm_t335_defconfig] Error 1
make: *** [sub-make] Error 2
$ python --version
Python 3.3.5
-------------------cut----------------------------
Apparently, print should be used as function - with parenthesis...
It seems that those scripts only work on Python versions 2.6 - 2.7?
>
> It is true we hope tools can work on broad range of versions,
> but it also means we have more restrictions when writing Python scripts.
>
> I have no idea which version we should expect at least.
> Your comments are welcome.
I'd propose to not bring any new dependency on python at all...
At least not for the simple task of building U-Boot...
Can't we use a bit more stable API then this of python?
>
>
> Changes in v2:
> - Fix git-description. s/exception/except/
> - Fix git-description. s/exception/except/
>
> Masahiro Yamada (2):
> kconfig: make multiconfig.py compatible with Python 2.4
> tools: make genboardscfg.py compatible with Python 2.5
>
> scripts/multiconfig.py | 73 +++++++++++++++++++++++---------------------------
> tools/genboardscfg.py | 4 +--
> 2 files changed, 36 insertions(+), 41 deletions(-)
>
--
Regards,
Igor.
More information about the U-Boot
mailing list