Serge Guelton via llvm-dev
2018-Dec-10 09:08 UTC
[llvm-dev] Migrate utils/ Python 2 scripts to Python 3
On Fri, Nov 30, 2018 at 03:25:10PM +0100, Serge Guelton via llvm-dev wrote:> On Thu, Feb 01, 2018 at 04:47:03PM -0500, James Y Knight via llvm-dev wrote: > > That said, I do think it could make sense to prepare llvm for the world in > > which "python" is python3 on some systems. So, I'd propose the following: > > 1. Change all #! lines to say "#!/usr/bin/env python2.7" instead of "#!/usr/bin > > /env python", if they only work with 2.7. > > 2. If someone feels motivated, and if it doesn't make the code obtuse, port > > scripts to work with either version -- and for such scripts, change the #! line > > to say "#!/usr/bin/env python". > > > I've started the work: > > https://reviews.llvm.org/D55121 > > More patch may come if there's an interest in that.Most if not all Python scripts in the clang/ repo have been ported and are waiting for reviews. I've split them in independant patches to ease the review works: https://reviews.llvm.org/D55259 https://reviews.llvm.org/D55258 https://reviews.llvm.org/D55213 https://reviews.llvm.org/D55208 https://reviews.llvm.org/D55205 https://reviews.llvm.org/D55204 https://reviews.llvm.org/D55202 https://reviews.llvm.org/D55200 https://reviews.llvm.org/D55199 https://reviews.llvm.org/D55197 https://reviews.llvm.org/D55196 https://reviews.llvm.org/D55193 https://reviews.llvm.org/D55194 Have fun with these!
Serge Guelton via llvm-dev
2019-Jan-04 09:31 UTC
[llvm-dev] Migrate utils/ Python 2 scripts to Python 3
On Mon, Dec 10, 2018 at 10:08:04AM +0100, Serge Guelton via llvm-dev wrote:> On Fri, Nov 30, 2018 at 03:25:10PM +0100, Serge Guelton via llvm-dev wrote: > > On Thu, Feb 01, 2018 at 04:47:03PM -0500, James Y Knight via llvm-dev wrote: > > > That said, I do think it could make sense to prepare llvm for the world in > > > which "python" is python3 on some systems. So, I'd propose the following: > > > 1. Change all #! lines to say "#!/usr/bin/env python2.7" instead of "#!/usr/bin > > > /env python", if they only work with 2.7. > > > 2. If someone feels motivated, and if it doesn't make the code obtuse, port > > > scripts to work with either version -- and for such scripts, change the #! line > > > to say "#!/usr/bin/env python". > > > > > > I've started the work: > > > > https://reviews.llvm.org/D55121 > > > > More patch may come if there's an interest in that. > > Most if not all Python scripts in the clang/ repo have been ported and are waiting for reviews. > I've split them in independant patches to ease the review works: > > https://reviews.llvm.org/D55259 > https://reviews.llvm.org/D55258 > https://reviews.llvm.org/D55213 > https://reviews.llvm.org/D55208 > https://reviews.llvm.org/D55205 > https://reviews.llvm.org/D55204 > https://reviews.llvm.org/D55202 > https://reviews.llvm.org/D55200 > https://reviews.llvm.org/D55199 > https://reviews.llvm.org/D55197 > https://reviews.llvm.org/D55196 > https://reviews.llvm.org/D55193 > https://reviews.llvm.org/D55194 > > Have fun with these!Hi folks, It is my great pleasure to announce that most-if-not-all Python scripts from llvm, clang and test-suite have been updated to work (hopefully) the same way on Python2 and Python3. As a consequence, all shebangs now points to python, and not python2 or python3, and the documentation should now refer to python, whith no specified version. So what's next? Maybe some buildbot could be updated to specifically build with a given Python version, if it's not already the case. I'll also added an herald rule to review commited python scripts, to ensure the compatible property remains true over time. Oh, and I *really* would like to thanks Michael Platings for the tremendous reviewing job he's been doing on this patch set o/ ++ Serge
James Y Knight via llvm-dev
2019-Jan-04 12:33 UTC
[llvm-dev] Migrate utils/ Python 2 scripts to Python 3
Awesome, that's great news! Thanks! On Fri, Jan 4, 2019, 4:32 AM Serge Guelton via llvm-dev < llvm-dev at lists.llvm.org wrote:> On Mon, Dec 10, 2018 at 10:08:04AM +0100, Serge Guelton via llvm-dev wrote: > > On Fri, Nov 30, 2018 at 03:25:10PM +0100, Serge Guelton via llvm-dev > wrote: > > > On Thu, Feb 01, 2018 at 04:47:03PM -0500, James Y Knight via llvm-dev > wrote: > > > > That said, I do think it could make sense to prepare llvm for the > world in > > > > which "python" is python3 on some systems. So, I'd propose the > following: > > > > 1. Change all #! lines to say "#!/usr/bin/env python2.7" instead of > "#!/usr/bin > > > > /env python", if they only work with 2.7. > > > > 2. If someone feels motivated, and if it doesn't make the code > obtuse, port > > > > scripts to work with either version -- and for such scripts, change > the #! line > > > > to say "#!/usr/bin/env python". > > > > > > > > > I've started the work: > > > > > > https://reviews.llvm.org/D55121 > > > > > > More patch may come if there's an interest in that. > > > > Most if not all Python scripts in the clang/ repo have been ported and > are waiting for reviews. > > I've split them in independant patches to ease the review works: > > > > https://reviews.llvm.org/D55259 > > https://reviews.llvm.org/D55258 > > https://reviews.llvm.org/D55213 > > https://reviews.llvm.org/D55208 > > https://reviews.llvm.org/D55205 > > https://reviews.llvm.org/D55204 > > https://reviews.llvm.org/D55202 > > https://reviews.llvm.org/D55200 > > https://reviews.llvm.org/D55199 > > https://reviews.llvm.org/D55197 > > https://reviews.llvm.org/D55196 > > https://reviews.llvm.org/D55193 > > https://reviews.llvm.org/D55194 > > > > Have fun with these! > > Hi folks, > > It is my great pleasure to announce that most-if-not-all Python scripts > from llvm, > clang and test-suite have been updated to work (hopefully) the same way > on Python2 and Python3. > > As a consequence, all shebangs now points to python, and not python2 or > python3, and the documentation should now refer to python, whith no > specified version. > > So what's next? Maybe some buildbot could be updated to specifically > build with a given Python version, if it's not already the case. > > I'll also added an herald rule to review commited python scripts, to > ensure the compatible property remains true over time. > > Oh, and I *really* would like to thanks Michael Platings for the tremendous > reviewing job he's been doing on this patch set o/ > > ++ > Serge > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190104/8584128b/attachment.html>