pythongtkpygobjectgobject-introspection

Is gschemas.compiled architecture specific (can I ship it with my python library)?


I'm working on a python library / app that uses Gtk.

Part of my build process uses glib-compile-schemas to create gschemas.compiled.

If I include gschemas.compiled in my library, will this break things, if somebody tries to use my library on something like ARM or 32 bit intel ?

(I would compile this as a post-install thing, but that seems to unsupported in setuptools which I am using).


Solution

  • You should not ship a compiled gschemas.compiled cache as part of your app — instead, you should just ship your *.gschema.xml file. gschemas.compiled is intended as a system-wide cache of all the *.gschema.xml files in (by default) /usr/share/glib-2.0/schemas, and should be regenerated by the package manager after an app installs a new schema.

    Debian has a lintian check to prevent packages shipping gschemas.compiled, for example.

    There seem to be answers here on askubuntu about how to call glib-compile-schemas in a post-install step using setuptools.

    To answer your specific question: yes, you should treat it as potentially architecture-specific.