[Starlingx-discuss] MultiOS: call of python via #!/usr/bin/env

Victor Rodriguez vm.rod25 at gmail.com
Wed Sep 11 14:54:19 UTC 2019


On Wed, Sep 11, 2019 at 9:25 AM Jeremy Stanley <fungi at yuggoth.org> wrote:
>
> On 2019-09-11 16:05:15 +0200 (+0200), Dominig ar Foll (Intel Open Source) wrote:
> [...]
> > Remains to decide if we call directly python2 or just python.
> > For me enforcing python2 by the OBS build system is easy (a simple
> > "prefer: python2" statement in "project config" , so I would be happy to
> > not enforce the pythin release on a per packet basis, but the people
> > working on Pythin3 support may have a different opinion that I would
> > like to know.
>
> The "python" (or "python2") and "python3" executables are
> interpreters for different programming languages. General consensus
> is that making a "python3" interpreter available as "python" is
> incorrect. A few distros have gone against this advice (notably Arch
> Linux), and have created a fair amount of pain for software authors
> as a result. I recommend using either #!/usr/bin/python2 or
> #!/usr/bin/python3 for clarity, and avoiding #!/usr/bin/python in
> new scripts if possible (but certainly never put #!/usr/bin/python
> in a Python-3.x-only script and expect the underlying system to
> provide a python3-compatible interpreter at /usr/bin/python, that's
> just asking for trouble).
> --
> Jeremy Stanley

So we agree that either #!/usr/bin/python2 or #!/usr/bin/python3 is
better than #!/usr/bin/env . Am I right ?
how many files needs this change ?

> _______________________________________________
> Starlingx-discuss mailing list
> Starlingx-discuss at lists.starlingx.io
> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss



More information about the Starlingx-discuss mailing list