handling interpreters in *-snapper scripts (or snapcraft)

Oliver Grawert ogra at ubuntu.com
Mon Jun 15 12:17:31 UTC 2015


hi,
Am Montag, den 15.06.2015, 14:00 +0200 schrieb Alexander Sack:
> Oliver,
> 
> if you use virtualenv check out the --relocate option.
> 
thats not what we are after ,,., virtualenv is way overkill here ... the
plan was to use PYTHONUSERBASE and ship the interpreter inside the snap
instead for this first shot script ...

> 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?

if your python code actually has "#!/usr/bin/env python" then we can
point the snappy environment to our own interpreter .... this isnt what
i'm talking about though ...

if you would want to re-use existing deb packages they will have a fixed
path since debian policy forbids "#!/usr/bin/env python", for modules
and the like i want to be able to re-use the archive to not have to
re-invent the wheel ... 

we could indeed enforce that only "#!/usr/bin/env python"  is allowed
but that would mean people have to actually patch files etc ... and
wouldnt help any other languages like perl, ruby, you-name-it ... what i
think is needed here is a proper general and future proof solution on
the system level that is able to adjust shebang paths on the fly for
everything at execution time ...

ciao
	oli




More information about the snappy-devel mailing list