python app not seeing libraries in Gnome Platform

Dan Nicholson dbn at endlessos.org
Tue Jul 20 22:05:12 UTC 2021


On Tue, Jul 20, 2021 at 11:28 AM Scott Mackay <mackay333 at msn.com> wrote:
>
> Thank you for the information, I will have to look around at what gets bindings and what doesn't.  Pygobject and pgi are two more libraries I had to manually add due to Gramps not seeing the Gnome Platform libraries, BTW.  Anyways, I didn't know about using pyenchant, which as of version 3.2.1 that I downloaded, includes enchant.  That sounds like a better solution than what I was doing.  So I installed pyenchant into the flatpak through the manifest, and took out enchant1.  Once installed, the Gramps flatpak still can not see enchant according to the Prerequisites Checker add-on.  However spell check does work.

pygobject is definitely in the GNOME platform. I used it in my example
commands to import Rsvg. pgi probably not since it seems it was an
experiment. I'd never heard of it until today.

If the spell checking is working, then it kinda sounds like the
prerequisites checker isn't working.

> Anyways, in my github branch as a test I tried adding the following lines to the finish args to make sure that the flatpak could see the Platform:
>
> - --filesystem=host
>
> - --filesystem=xdg-run/usr/lib/x86_64-linux-gnu/

These are exposing paths from the host into the sandbox, so I doubt
they're going to help with dependencies.

> And I add --exec-prefix=/usr/lib/x86_64-linux-gnu/ to the python3 build command to make sure that Gramps knows where to look for the platform.  The flatpak still can't find the Platform once installed.  I'm wondering if the links to the platform library from the flatpak get broken after the flatpak exits?

Flatpak mounts the runtime and the app to the same locations every
time it runs. The runtime is mounted at /usr and the app is mounted at
/app. It might help to start your app from a shell and poke around
with "flatpak run --command=bash your.app.here".


More information about the Flatpak mailing list