[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] add shebang line to build/run_tests.py

From: Max Bowsher <maxb1_at_ukf.net>
Date: 2006-05-30 16:29:16 CEST

Madan U Sreenivasan wrote:
> On Tue, 30 May 2006 16:34:05 +0530, Malcolm Rowe
> <malcolm-svn-dev@farside.org.uk> wrote:
>
>> On Tue, May 30, 2006 at 04:12:32PM +0530, Madan U Sreenivasan wrote:
>>> Pl. find a patch that adds the shebang line (#!/usr/bin/env
>>> python) to
>>> build/run_tests.py. As a consequence, the svn:executable property had to
>>> be added to build/run_tests.py and the Makefile.in modified to run
>>> run_tests.py directly (instead of 'python run_tests.py').
>>>
>>
>> Why is this a good idea?
>
>
> Because it is easier to invoke run_tests.py. Also the test scripts in
> subversion/tests/cmdline use the shebang line. This change would make
> runnable python scripts more uniform.
>
> OTOH, I was wondering if there is any specific reason we have a python
> script without the shebang line.

Yes, there is, in specific cases. There should be no shebang line in
scripts for which it is important that they run under a specific
instance of the Python environment - this is the case for
build/get-py-info.py.

However, general scripts generally should have a shebang of
"#!/usr/bin/env python".

Regarding the change to Makefile.in in your patch - that's not ok: since
we've taken the trouble to find a suitable python version explicitly, we
should use that knowledge.

Max.

Received on Tue May 30 16:29:58 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.