[cfe-dev] python vs python3 shebang

Valeriy Savchenko via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 22 02:34:18 PDT 2021


As far as I remember, it’s trickier on Windows where there is a special hack for shebang to python specifically.

-Valeriy

> On 22 Apr 2021, at 12:29, Haojian Wu via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hello folks,
> 
> We have a mixture of python(2) vs python3 shebang usage in llvm codebase.
> 
> As python2 upstream support has ended, what's the LLVM policy here? Shall we change the shebang to python3 for all scripts? 
> 
> - For llvm-developer-only python scripts (e.g. clang-tidy/add_new_check.py), it is safe to do this change, as LLVM development <https://llvm.org/docs/GettingStarted.html#software> requires python >= 3.6 
> - For python scripts being interacted with people's workflow (e.g. clang-format-diff.py), it seems unclear to me, changing the shebang would break people's workflow on python2 machines.
> 
> I have some patches (https://reviews.llvm.org/D101038 <https://reviews.llvm.org/D101038>, https://reviews.llvm.org/D101037 <https://reviews.llvm.org/D101037>). What do people think?
> 
> 
> Thanks,
> Haojian
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210422/3da9de8d/attachment.html>


More information about the cfe-dev mailing list