On 16 April 2015 at 22:34, Peter Maydell <[email protected]> wrote:
> On 16 April 2015 at 20:58, Vincent Legoll <[email protected]> wrote:
>> But I did it the other way, which albeit not perfect, is an accepted
>> idiom, that is used in the top level stg script itself.
>>
>> Or maybe I misunderstood your comment, and you just prefer being
>> more specific, and would rather choose :
>>
>> #! /usr/bin/env python2
>>
>> instead ?
>>
>> Please explain what is the problem with adding the shebang.
>
> You can't have a #! line which works both on:
>  (a) systems where python 2 is "python2"
>  (b) systems where python 2 is "python"
>
> So you have to let the makefile invoke python via $(PYTHON)
> (which it guesses at a setting for), so that the user can
> override it if necessary. And given that the makefile
> has to do this, there's no point in also having the #! line
> (especially one which picks a different default executable
> to the one Makefile does).

I think what Vincent was looking for is to be able to run t/test.py
directly. The Makefile should continue to use $(PYTHON) when "make
test" is invoked.

We already use "#!/usr/bin/env python2" in setup.py and stg, though
the latter is overridden on installation to /usr/bin/python2 on my
system and we don't invoke the former directly. But I guess as a
debugging tool, rarely invoked directly, adding the python2 shebang to
t/test.py is fine.

-- 
Catalin

_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users

Reply via email to