mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Stefan Lengfeld <contact@stefanchrist.eu>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] docs: add python version in shebang
Date: Tue, 17 Sep 2019 10:01:26 +0200	[thread overview]
Message-ID: <20190917080126.2sp36vixvfvlmvtk@pengutronix.de> (raw)
In-Reply-To: <20190915193114.3243-1-contact@stefanchrist.eu>

Hello Stefan,

On Sun, Sep 15, 2019 at 09:31:14PM +0200, Stefan Lengfeld wrote:
> On my machine 'make docs' fails with
> 
>     Traceback (most recent call last):
>       File "/home/stc/git/barebox/Documentation/gen_commands.py", line 156, in <module>
>         parse_c(source)
>       File "/home/stc/git/barebox/Documentation/gen_commands.py", line 34, in parse_c
>         for line in file(name, 'r'):
>     NameError: name 'file' is not defined
> 
> because /usr/bin/python points to python3 instead of python2. Fix this
> by including the language version in the shebang of the script.

It would be much preferable to convert this code to Python3. I looked
into that and it wasn't that hard to even make it compatible to both
Python 2 and Python 3. (One downside is that Python 3 is more picky
about file encodings, so I have to insert a patch that converts the few
latin1 file left in the tree to utf-8 first. But as this is a good thing
on its own (IMHO) that's not too bad.)

Find the two patches in reply to this mail.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-09-17  8:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15 19:31 Stefan Lengfeld
2019-09-17  8:01 ` Uwe Kleine-König [this message]
2019-09-17  8:02   ` [PATCH 1/2] Convert latin1 files to utf-8 Uwe Kleine-König
2019-09-17 10:47     ` Sascha Hauer
2019-09-17  8:09   ` [PATCH 2/2] Documentation: make gen_commands helper python3 compatible Uwe Kleine-König
2019-09-17  8:33     ` Uwe Kleine-König
2019-09-18 19:25   ` [PATCH] docs: add python version in shebang Stefan Lengfeld

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=20190917080126.2sp36vixvfvlmvtk@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=contact@stefanchrist.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox