I’m not sure what the story is for building on other distributions/operating systems. But the primary way snapd lets you use binary packages across distribution releases and distributions is by using mount name spaces so the snapped application sees /snap/core/current
as the root file system.
That core file system is built from Ubuntu 16.04, so it isn’t too surprising that you might need Ubuntu packages to build applications to run on top of it. This will probably change a bit with the introduction of base snaps, but that would just involve swapping out one set of dependencies and build OS for another.
Getting back to the problem at hand: if snapcraft is using the system Python interpreter to build the package, then you either need (a) python-gi
listed in build-packages
, or (b) everything needed to build python-gi
from PyPI listed in build-packages
.