On 25 January 2017 at 11:02, Sergio Schvezov <[email protected]>
wrote:
> On Wed, 25 Jan 2017 08:17:17 +1300, Michael Hudson-Doyle wrote:
> > Hm, I was assuming that the PYTHONHOME leaking was due to things in the
> > snap specifically (is the source to the snap available?), but are they
> set
> > by snapd or snap-confine or something?
>
> Might be easier to follow in the bug Dave logged and linked to earlier,
> but in a nutshell: snapcraft sets up a couple of variables to get things
> going. There seems to be conflicts with classic systems but are only
> viewable now with trusty enablement.
>
Well no, what I am complaining about is something perhaps related to that
bug but not the same.
> I am guessing the snapcraft.yaml for this looks like
>
> parts:
> asciinema:
> plugin: python
> python-packages: [asciinema]
>
> I've added python3 as a part and did some environment tweaks locally and
> it works like a charm.
>
But if you did that, PYTHONHOME is presumably still set in the environment
of the command you are recording with asciinema. I was trying to record me
using a new widget in a program using urwid and getting this sort of thing:
mwhudson@aeglos:/opt/opensource$ asciinema rec -c 'python3
urwid/examples/pop_up.py '
~ Asciicast recording started.
~ Hit Ctrl-D or type "exit" to finish.
Traceback (most recent call last):
File "urwid/examples/pop_up.py", line 3, in <module>
import urwid
ImportError: No module named 'urwid'
~ Asciicast recording finished.
~ Press <Enter> to upload, <Ctrl-C> to cancel.
You have to do this "asciinema rec -c 'PYTHONHOME=/usr python3
urwid/examples/pop_up.py '" instead (and even that ends up using python3
from the core snap, not the one I have installed).
Cheers,
mwh
--
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/snapcraft