Applications using python (and py*-gtk)
Joshua Root
jmr at macports.org
Fri Apr 13 08:37:44 PDT 2012
On 2012-4-14 01:13 , Thibaut Paumard wrote:
> Hi,
>
> Le 13/04/12 16:58, Joshua Root a écrit :
>>> I could do that by patching the shabang line:
>>> #!/usr/bin/env python2.6
>>
>> You can't count on the user's $PATH being the way you want, so this
>> needs to be:
>> #!${prefix}/bin/python2.6
>>
>> You can accomplish this like so:
>>
>> reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.6|" \
>> ${worksrcpath}/some/file.py
>>
>
> Thanks for the two simultaneous answers. You are right, of course. In
> which phase must it be done to affect correctly binary installs? Am I
> right in believing this would be in a post-activate hook?
You'd do it at build time, in post-patch if the file exists then, or in
e.g. post-destroot if it's generated later.
Binaries won't be used if your prefix doesn't match that used on the
server. There are far more problems with relocating binaries than this
one, so we just don't support it.
- Josh
More information about the macports-dev
mailing list