From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v2 0/2] Make Python scripts compatible with older versions
Date: Thu, 07 Aug 2014 16:17:21 +0300 [thread overview]
Message-ID: <53E37C61.8040104@compulab.co.il> (raw)
In-Reply-To: <20140807105709.GR19374@bill-the-cat>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/07/14 13:57, Tom Rini wrote:
> On Mon, Aug 04, 2014 at 04:17:00PM +0300, Igor Grinberg wrote:
>> Hi Masahiro,
>>
>> On 08/04/14 15:59, Masahiro Yamada wrote:
>>> Hi.
>>>
>>>>
>>>>> It seems that those scripts only work on Python versions 2.6 - 2.7?
>>>
>>>
>>>
>>> I took a quick look and I found Python 3.x is not comatible 2.x at all.
>>>
>>> 3.x requires the "print" is called like
>>> print(msg, file=sys.stderr)
>>> but it failes in Python 2.7.x.
>>
>> Last time I checked the print function, it worked with parenthesis on
>> both versions 2.7 and 3.x.
>>
>>>
>>> Moreover, "except ... , ..." fails in 3.x
>>> while "except ... as ..." fails in 2.5 or earlier.
>>>
>>> If the compatibility with python 3 is the requirement,
>>> I can't do this. I must throw Python scripts away.
>>
>> I think we'd better replace these with something more stable
>> in terms of API... bash? perl?
>
> I don't think API is an argument against python,
Not the API as stand alone, of course, but the burden to support
its changes and breakages.
Why should U-Boot even have python as a build prerequisite?
I really think that having shell, make, and $(cross)gcc should be
enough for the basic source build.
> we just need
> /usr/bin/env python2 as how we invoke our scripts.
This means impose python version dependency for U-Boot source build?
Correct me if you think I'm wrong, but I don't think this is a good
practice...
I think that for tools like buildman, patman, etc. - this is
perfectly fine to impose an interpreter/compiler version, but not
for the basic source builds.
>
> The question is, what helper scripts do we really need to have around
> and expect many people to use.
IMO, helper scripts, that are not involved in U-Boot source build
can be written in any language/script.
- --
Regards,
Igor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJT43xhAAoJEBDE8YO64EfaAt0QAIKiLhrxDpH2qPplAKr7SRrB
ohP+7aRvKAV175KwOGIbWEDNybmdii+/wW+Hl1pHkt7UL6jcJVQjQ8Qrv9vg44TZ
YFR14VE4lBMOU62NXaTBMaae49dT69Kq2LemOvizNbMr6PvWi3cvFTWS9voROVtE
ydWCpQhFzj6iau55Eg8anFe47jFGdsGyysdfCE7Vu+h1KOMGvEY613rZO+od3ZR4
vHAAtlD4wvIfg/r+8FRvbSnooI+HlTI/vlimcwkH1YlX1I256Db15FAYx9OnREPN
/9NTFXiFLAd7iucjI0ScF+hY+U0ni4qcA5le/C5/lgMgQi08vSlWKuziJNbGST1/
P4ijeb/kh34oTYphKcJytr5paml9Cd+ljIWDi3AWjSxGjQm4Oc3knk0CK9hfV3N7
A1Xs9hZgEMzU01peYtj8FyeEmpRXHpWhHAbPB5N2xcKW2rDrnVhX4+qupRxYP2VN
LcWuTrJGvFJUiG0T4+gsI/DiStLNQxI0M/UoBlIhSP9fIceVCr6NNFZRcPG1MBfy
MsOMSW4SgP1Yg/Gil47bIXiZDSNn0QNJtanAEBwHSZOnmvw+WO1XMoGAaAnAzRUw
xSd5+gsj2xeWOI4adc2ye95ZZ8FLh5rfaZoxv0q8aeuqnBsp4dBDQL95WNpDVDdG
Kpkpr6gloENHHwTptRVc
=iVHF
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2014-08-07 13:17 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 10:23 [U-Boot] [RFC PATCH v2 0/2] Make Python scripts compatible with older versions Masahiro Yamada
2014-08-04 10:23 ` [U-Boot] [RFC PATCH v2 1/2] kconfig: make multiconfig.py compatible with Python 2.4 Masahiro Yamada
2014-08-04 10:23 ` [U-Boot] [RFC PATCH v2 2/2] tools: make genboardscfg.py compatible with Python 2.5 Masahiro Yamada
2014-08-22 6:01 ` Masahiro Yamada
2014-08-22 6:18 ` Masahiro Yamada
2014-08-23 12:44 ` Tom Rini
2014-08-25 1:53 ` Masahiro Yamada
2014-08-04 10:40 ` [U-Boot] [RFC PATCH v2 0/2] Make Python scripts compatible with older versions Simon Glass
2014-08-04 11:21 ` Igor Grinberg
2014-08-04 12:00 ` Masahiro Yamada
2014-08-04 12:59 ` Masahiro Yamada
2014-08-04 13:17 ` Igor Grinberg
2014-08-04 13:28 ` Masahiro Yamada
2014-08-07 10:57 ` Tom Rini
2014-08-07 13:17 ` Igor Grinberg [this message]
2014-08-07 16:57 ` Tom Rini
2014-08-07 17:33 ` Stephen Warren
2014-08-07 17:53 ` Tom Rini
2014-08-10 8:49 ` Igor Grinberg
2014-08-10 11:14 ` Tom Rini
2014-08-11 10:18 ` Igor Grinberg
2014-08-11 13:12 ` Tom Rini
2014-08-11 23:03 ` Masahiro YAMADA
2014-08-12 1:53 ` Tom Rini
2014-08-18 4:45 ` Masahiro Yamada
2014-08-11 16:58 ` Stephen Warren
2014-08-12 10:32 ` Igor Grinberg
2014-08-04 13:50 ` Tom Rini
2014-08-05 2:05 ` Yan, Miao
2014-08-05 14:18 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E37C61.8040104@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.