handling interpreters in *-snapper scripts (or snapcraft)

Alexander Sack asac at canonical.com
Mon Jun 15 12:00:58 UTC 2015


Oliver,

if you use virtualenv check out the --relocate option.

That one adjusts the shebangs afaik. Not 100% sure what to best set it
to.... maybe #!/usr/bin/env python and then make snappy hook into that
env to adjust the PATH to look at right place inside the snap that
gets launched?


On Mon, Jun 15, 2015 at 1:55 PM, Rick Spencer
<rick.spencer at canonical.com> wrote:
>
>
> On Mon, Jun 15, 2015 at 7:39 AM, Oliver Grawert <ogra at ubuntu.com> wrote:
>>
>> hi,
>>
>> i'm currently trying to set up something similar to node-snapper for
>> python snaps ... i.e. "py-snapper".
>>
>> the problem i am hitting my head against now is how to handle these
>> hardcoded interpreter lines without requiring the user to manually
>> re-write them when producing a snap (or have error prone code in the
>> *-snapper script to mangle them with a prefix or some such)
>>
>
> How does one manage porting a Python app to different platforms today?
> Surely /bin/... is not functional on Macs and Windows?
>
> I'm wondering how bad it really is to ask snappers to change the shebang
> line to something sensible?
>
> Cheers, Rick
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>



More information about the snappy-devel mailing list