python app not seeing libraries in Gnome Platform

Dan Nicholson dbn at endlessos.org
Tue Jul 20 15:13:00 UTC 2021


On Tue, Jul 20, 2021 at 6:03 AM Scott Mackay <mackay333 at msn.com> wrote:
>
> The problem with Gramps not seeing some of the Gnome Platform libraries is that Gramps is not fully functional in some things.  For example, since Gramps can not see enchant2 in the Gnome Platform, I had to manually add enchant-1 along with some other dependencies into the manifest to get spell checking to work.  I couldn't get enchant2 to compile into the manifest, so I used the obsolete enchant1.  That bothers me, and I would prefer to make the flatpak smaller with access to up to date Gnome libraries rather than include a lot of extra dependencies.

The GNOME platform provides libenchant-2, but I imagine you need to
provide pyenchant in your application to get the python bindings.
Unlike many of the GNOME libraries, enchant's bindings don't come from
GObject Introspection, so you don't get python bindings for free from
pygobject.

$ flatpak run --share=network org.gnome.Sdk//3.38
[📦 org.gnome.Sdk ~]$ python3 -c 'import enchant'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'enchant'
[📦 org.gnome.Sdk ~]$ pip3 install -q pyenchant
[📦 org.gnome.Sdk ~]$ python3 -c 'import enchant'

--
Dan


More information about the Flatpak mailing list