[libcxx-commits] [clang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [openmp] [polly] Python-related cleanups (PR #163566)

David Spickett via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 16 09:01:45 PDT 2025


DavidSpickett wrote:

> Moreover, this may have pretty big implications since the implementation of these commands 8s very inconsistent across platforms and no common rules seem to exist.

I thought there was a rule but you're right, it does not seem consistent.

The PEP you linked has advice for everything but Linux - https://peps.python.org/pep-0394/#for-python-script-publishers. That points us towards `python`, I think, hard to tell.

For Windows https://peps.python.org/pep-0397/#shebang-line-parsing only mentions `python`. Though this may have changed since and the document does mention `python3` elsewhere.

There is also this previous thread https://discourse.llvm.org/t/python-vs-python3-shebang/58117/1. The highlights of which are "Windows might want python" and "make the installer rewrite the shebang lines". Which is a much more involved change.

The mix we have right now is clearly working for someone, so the onus is on the person changing it to justify it, probably with an RFC on Discourse.

I doubt that @rossburton was expecting to sign up for that :) Ross I don't intend to put up a wall here, but without doing more work, I don't see a single recommendation here (and unfortunately don't have time to look into it myself).

That said, if changing a handful of these files would unbreak your use cases, we can consider changing those specific files.

https://github.com/llvm/llvm-project/pull/163566


More information about the libcxx-commits mailing list