On Mon, Jun 24, 2013 at 12:00 PM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Branko Čibej wrote on Mon, Jun 24, 2013 at 16:32:56 +0200:
>> On 24.06.2013 11:46, Daniel Shahaf wrote:
>> > Branko Čibej wrote on Sat, Jun 22, 2013 at 18:02:32 +0200:
>> >> On 22.06.2013 17:46, Nico Kadel-Garcia wrote:
>> >>> # Canonicalize path to python, correctly
>> >>> for name in tools/server-side/svnpubsub/*.py; do
>> >>> sed -i 's|#!/usr/local/bin/python|#!/usr/bin/env python|g' $name
>> >>> done
>> >> The above will actually break the hook scripts. At best you can use
>> >> "#!/usr/bin/python" in those scripts.
>> > And _that_ will break them on FreeBSD.
>>
>> The discussion is about how to package svnpubsub into an RPM. I don't
>> see what FreeBSD has to do with that.
>
> Changing #!/usr/local/bin/python to #!/usr/bin/python in a script in
> trunk would break that script on FreeBSD.
And using /usr/local/bin/python is broken for everyone else. It's easy
enough to fix in the RPM .spec file, and I've done so. But since
"/usr/bin/env python" is more portable, and in general works quite
well, perhaps being consistent about using it among all the ".py"
files in svnpubsub would be more safe.
The normal way to handle changing deployment environments is with an
actual configuration or deployment tool, such as autoconf, that sets
the path to the locally detected python and uses *that*.
Received on 2013-06-24 21:41:18 CEST