Packaging Python script with UTF-8 mode

Maybe it is a question for the #packaging category.

If I am not mistaken, it is indeed the installer (pip for example) who is in charge of writing the script wrapper. And I believe that in pip’s case, it is done by distlib.scripts which is vendored in pip.

As far as I know pip does not offer any way to customize the shebang that it generates.

Related: