From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 18 Aug 2014 10:36:48 -0600 Subject: [U-Boot] [PATCH v2] kconfig: convert Kconfig helper script into a shell script In-Reply-To: References: <1408251378-23485-1-git-send-email-yamada.m@jp.panasonic.com> <53F227E7.2070108@wwwdotorg.org> Message-ID: <53F22BA0.1030403@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/18/2014 10:27 AM, Simon Glass wrote: > Hi, > > On 18 August 2014 10:20, Stephen Warren > wrote: > > On 08/16/2014 10:56 PM, Masahiro Yamada wrote: > > Commit 51148790 added scripts/multiconfig.py written in Python 2 > to adjust Kconfig for U-Boot. > > It has been hard for Python 3 users because Python 2 and Python 3 > are not compatible with each other. > > We are not happy about adding a new host tool dependency > (in this case, Python version dependency) for the core build > process. > After some discussion, we decided to use only basic tools. > > The script may get a bit unreadable by shell scripting, but we > believe > it is worthwhile. > > In addition, this commit revives "_config" target that is > equivalent to "_defconfig" for backwards compatibility. > It is annoying to adjust various projects which use U-Boot. > > > Personally, I think this change isn't justified; I see no reason to > replace the perfectly working existing script. Still, if that's > what's desired... > > > Agreed, it seems unfortunate - long shell scripts are so much harder to > work with IMO. Is it really not possible to make code compatible with > both? Also we have lost the docs at the top of the file I think. It might well be possible to be compatible with both Python 2 and 3, but the solution mentioned earlier in the thread was as simple as: - #!/usr/bin/python + #!/usr/bin/python2 That would only fail on systems: a) Without Python2 (which seems a little unlikely at the moment, and even if that's the case by default, there's enough Python2 code that surely a compat package would be available) b) So old that there is no python2 symlink, just python. I don't know when python2 was added.