Namespace Adw not available when building Python app with libadwaita
I'm trying to build a Python app using libadwaita
in Builder 41.3 flatpak-stable on Fedora 35.
I have gcc gobject-introspection-devel cairo-gobject-devel pkg-config python3-devel gtk4
installed on the system.
I have the following imports in my main.py
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gio, Adw
When I try to build the app in Builder I get:
Traceback (most recent call last):
File "/app/bin/adwaita_flap", line 40, in <module>
from adwaita_flap import main
File "/app/share/adwaita_flap/adwaita_flap/main.py", line 22, in <module>
gi.require_version('Adw', '1')
File "/usr/lib/python3.9/site-packages/gi/__init__.py", line 126, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Adw not available
I'm able to build Python apps with libadwaita
in a different IDE using a virtual environment for Python.
Is there anything additional I need to do in Builder to be able to build Python apps with libadwaita
?
Edited by M