I want to import Xdp in the Gnome Builder python template called "GTK4 Application".
Adding this:
gi.require_version("Xdp", "1.0")
from gi.repository import Xdp
results into:
Traceback (most recent call last):
File "/app/bin/python-test", line 45, in <module>
from python_test import main
File "/app/share/python-test/python_test/main.py", line 25, in <module>
gi.require_version("Xdp", "1.0")
File "/usr/lib/python3.11/site-packages/gi/__init__.py", line 126, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Xdp not available
Application exited
The strange thing is that require_version does work for Gtk and Adw just not for Xdp
If I run the same code in a venv it works fine.