Comment 8 for bug 524148

Revision history for this message
marmuta (marmuta) wrote :

Hi Emmet, sorry for the delay.
> I suspect that for
> advanced hackers (not I) it would be possible to use the development
> headers to generate compiled python bindings and set the right
> dependencies at build time.
Turns out there are actually code generators for ctypes.
http://starship.python.net/crew/theller/ctypes/old/codegen.html
That might be the most prominent one, but it still appears somewhat outdated if not abandoned. Also I'm not sure if ctypes is the right choice anymore once you need to generate source. IMO the apeal is it's low barrier for accessing a handful of functions. If the code grows beyond that it's probably better to switch to a C extension anyway.

> Another alternative would be to work with X upstream to get generic
> python bindings, and then require them in onboard.
This would be great, but it is a bit out of scope for me personally. I had looked at python-xlib btw., but it doesn't have direct support for xinput or any other extension as far as I could tell.

> The problem with retaining the debian/rules patch if the SONAMEs are
> hardcoded in X11.py is that the package will silently break if there
> is an ABI change in the libraries, because the binary package will
> appear to have been updated correctly with a rebuild, but then will
> fail at runtime.
Is that necessarily the case here? I'm not exactly experienced with packaging, but can't we simply add libx11-6 and libxi6 as depends and as you suggested their -dev packages as build-depends manually and be done with it? Wouldn't that be enough to break packaging and installation in case of an ABI change? Assuming "6" in libxi6 is the same as in the soname libxi.so.6, is there still a possibility for a backwards incompatible lib to slip in under the radar?

> Regardless of the treatment of the debian/rules patch, the
> debian/watch patch should be preserved (or modified if the launchpad
> download locations change).
Yes, no objections from me there. I would need to double check with the other devs though.