git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Standardize python shebangs

From
Johan Herland <johan@herland.net>
Date
May 7, 2014, 12:28 UTC
Message-ID
<CALKQrgefFQF-6ND9+wb8PXZs+vZMfqEdzgRieOYCUCGOs8u2-A@mail.gmail.com>
In-Reply-To
<536a14f9de982_675a167130cb4@nysa.notmuch>

On Wed, May 7, 2014 at 1:11 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 10 quoted lines
> Johan Herland wrote:
>> On Wed, May 7, 2014 at 12:03 PM, Felipe Contreras
>> <felipe.contreras@gmail.com> wrote:
>> > It's better if all our scripts use the same '/usr/bin/env python'.
>>
>> Only if they are source compatible with both Python2 and Python3. See
>> PEP394 <URL: http://legacy.python.org/dev/peps/pep-0394/ >. Otherwise
>> (for python2-only scripts) '/usr/bin/env python2' is the way to go.
>
> It doesn't matter. People and aistributions have to change them anyway.

No, that's _exactly_ what PEP394 addresses. If we standardize on '/usr/bin/env python2' (I assume all our .py scripts are Python2) then they should work on _all_ distros, and Arch Linux would not have to do their current python -> python2 hack (which you referred in another thread).

If we instead standardize on '/usr/bin/env python' instead, we only end up annoying forward-looking distros that (want to) enable python == python3 (but obviously also provide python2 for as long as necessary).

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: James DenholmNext: Matthieu Moy
Message 5 of 13 in “Standardize python shebangs”
  1. Standardize python shebangsFelipe Contreras, May 7, 2014
  2. Johan HerlandMay 7, 2014
  3. Felipe ContrerasMay 7, 2014
  4. James DenholmMay 7, 2014
  5. Johan HerlandMay 7, 2014
  6. Matthieu MoyMay 7, 2014
  7. Felipe ContrerasMay 7, 2014
  8. Matthieu MoyMay 7, 2014
  9. Felipe ContrerasMay 7, 2014
  10. Matthieu MoyMay 7, 2014
  11. James DenholmMay 7, 2014
  12. Matthieu MoyMay 8, 2014
  13. Johan HerlandMay 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.