Le 02/10/2016 à 20:48, Robert Park a écrit :
> On Sun, Oct 2, 2016 at 1:43 AM, Loïc Minier <loic.min...@ubuntu.com> wrote:
>> So just create a matplotlibrc in your $SNAP and you should be good
> Thanks for this analysis. I created an empty matplotlibrc in $PWD and
> then got this instead:
>
> PermissionError: [Errno 13] Permission denied:
> '/home/robru/src/weight/matplotlibrc'
>
>
> Then I added 'home' to my plugs and got this:
>
> RuntimeError: Could not find the matplotlib data files
>
>
> I suppose the next step is to find a real matplotlibrc and use that
> instead of an empty file, however, my app doesn't need 'home' plug at
> all so it's a bit daft to include that for an optional config file
> that matplotlib has the ability to ignore if only it doesn't find one
> that exists. (I've used matplotlib for years and never known or cared
> about this file so whatever the defaults are are fine, I'd rather not
> ship a copy of this file)
>
> Is there a plug to just read /etc? or a sensible way to set all those
> env vars to /dev/null or something?
Hey Robert,

There is no plug to read from /etc on purpose. The goal is your snap to
be relocatable and not relying on anything system-wide, so that it can
run in different context. That's why you need to find a way to embedded
this file and looking for local assets.

If you want to change some env vars, you can create a shell wrapper that
you point your snap into. The shell will then executed your real binary,
once it has settled your environment properly.
Cheers,
Didier

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to