Dear LazyWeb:
I’m trying to clean up the python bindings for the next release of a GObject-based library, so I’m using pygtk and its codegen magic; unfortunately, being codegen.py
an incredibly bad program, I can’t see why or how it’s failing to read the .defs
and .override
files, and why it doesn’t generate anything. Is there a way to have some sort of error message or information except for the quite useless statistics recap? I’m using the same build system used by pygtk, so this must work if you apply enough bad mojo somewhere. I don’t want to dwelve into the 1707 lines of dense python – I’d rather spend my time binding a library.
Thanks.
Three hours, and many curses, later: it seems that I have mistakenly deleted a '%%'
between a ‘ignore-blob’ declaration and the body of the override file. This, for posterity, is logically equivalent to “ignore whatever exists after this space”. which is, all in all, logically coherent, and I’m more than willing to beat my head against the wall for my stupidity. But if codegen.py had a “verbose” mode (instead of me sprinkling the code with “print” statements) I would have found this way sooner than the three hours it took me. A simple line redirected to stderr telling me “hey, I’m ignoring this and that” would have been sufficient.
Coincidentally I’ve just been overhauling the codegen that makes Haskell bindings for GObject-based libraries.
Yes, they’re really tricky programs full of complex details. No doubt it’s been tuned for some of the random details of the Gtk API and your other GObject lib is a tad different. If only we had that glib type introspection stuff, then this task would be easy.
Good luck!