Re: [PATCH] doc: Various fixes to makedocbook for python3.8

Jon Turney <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 24/08/2020 11:01, Corinna Vinschen via Newlib wrote:
> On Aug 23 20:41, Jon Turney wrote:
>> On 23/08/2020 16:23, Ken Brown wrote:
>>> On 8/22/2020 2:45 PM, Jon Turney wrote:
>>>> ---
>>>>    newlib/doc/makedocbook.py | 8 +++++---
>>>>    1 file changed, 5 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/newlib/doc/makedocbook.py b/newlib/doc/makedocbook.py
>>>> index 92d0f279d..3fab26f1a 100755
>>>> --- a/newlib/doc/makedocbook.py
>>>> +++ b/newlib/doc/makedocbook.py
>> [...]
>>> Would it make sense to also change the shebang line so that
>>> makedocbook.py uses python3?  Currently the build of Cygwin on Fedora
>>> uses python3, but the build of Cygwin on Cygwin uses python2.  This is
>>> of no great importance, but a recent IRC discussion shows that it can be
>>> confusing.
>>
>> Yeah, I guess that would make some sense, given that python2 is now EOL.
>>
>> Otoh, making it gratuitously not work with python2 seems a bit harsh.
>>
>> On the gripping hand, reading PEP 0394, I see it doesn't actually require
>> that 'python' exist at all, so I guess changing the shebang as you suggest
>> is the right thing to do.
> 
> With this change, please push.

Testing on system where '/usr/bi/python' doesn't exist, there's also 
another script which I neglected to update.

Patch attached.
0001-doc-Also-update-shebang-for-chapter-texi2docbook.py.patch (text/plain, 737 B)
From 53a54584e06729e4c23995e9993dc1c88106c32d Mon Sep 17 00:00:00 2001
From: Jon Turney <[email protected]>
Date: Tue, 25 Aug 2020 17:16:36 +0100
Subject: [PATCH] doc: Also update shebang for chapter-texi2docbook.py

---
 newlib/doc/chapter-texi2docbook.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/doc/chapter-texi2docbook.py b/newlib/doc/chapter-texi2docbook.py
index e21489b9a..1a7803091 100755
--- a/newlib/doc/chapter-texi2docbook.py
+++ b/newlib/doc/chapter-texi2docbook.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # python script to convert the handwritten chapter .texi files, which include
 # the generated files for each function, to DocBook XML
-- 
2.28.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.