Bug 457660 - [Patch] Python bindings
[Patch] Python bindings
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: empathy-maint
empathy-maint
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-07-17 14:59 UTC by Michael Sheldon
Modified: 2007-08-19 19:59 UTC (History)
6 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python bindings for libempathy and libempathy-gtk (85.96 KB, patch)
2007-07-17 15:00 UTC, Michael Sheldon
needs-work Details | Diff | Review
Improved python bindings for libempathy and libempathy-gtk (89.10 KB, patch)
2007-08-17 00:22 UTC, Michael Sheldon
none Details | Diff | Review
Improved python bindings for libempathy and libempathy-gtk (89.07 KB, patch)
2007-08-17 10:22 UTC, Michael Sheldon
none Details | Diff | Review
Improved python bindings for libempathy and libempathy-gtk (89.26 KB, patch)
2007-08-19 19:05 UTC, Michael Sheldon
reviewed Details | Diff | Review

Description Michael Sheldon 2007-07-17 14:59:04 UTC
Attached are bindings for libempathy and libempathy-gtk, they don't completely wrap all functions and there are still a few problems that need fixing but in general they're usable.
Comment 1 Michael Sheldon 2007-07-17 15:00:18 UTC
Created attachment 91894 [details] [review]
Python bindings for libempathy and libempathy-gtk
Comment 2 Xavier Claessens 2007-07-20 09:11:38 UTC
Thanks for the patch, I have some comments:

1) Is it possible to move all python thinkgs into a separate directory? Like python/pyempathy and python/pyempathy-gtk.

2) I guess .defs files are generated at build-time, so it shouldn't be in the patch, or I'm wrong?

3) Makefile.bindings shouldn't hardcode CFLAFS and LDFLAGS. I think that should be in a Makefile.am with an option in configure.ac to optionally compile the python bindings. Something like ./configure --enable-python.

Thanks !
Comment 3 Lauro Moura 2007-08-12 14:03:57 UTC
Answering question 2 - Usually the .defs are generated manually and shipped with the package, , as they can be edited to make a more suitable API instead of just wrapping C functions or due to limitations in the generator.
Comment 4 Michael Sheldon 2007-08-17 00:22:55 UTC
Created attachment 93823 [details] [review]
Improved python bindings for libempathy and libempathy-gtk

* Bindings are now in a separate directory.
* Fully using autotools for building, with the switch --enable-python. 
* Updated to work with current HEAD (~0.11)

As Lauro mentioned the .defs files have to be tweaked manually after generation (the code generator can't handle certain things, such as GObject interfaces). I've also updated the bindings.
Comment 5 Michael Sheldon 2007-08-17 10:22:28 UTC
Created attachment 93842 [details] [review]
Improved python bindings for libempathy and libempathy-gtk

* Renamed module from libpyempathy and libpyempathygtk to simply empathy and empathygtk
* Fixed conflict when loading empathy and empathygtk simultaniously
Comment 6 Michael Sheldon 2007-08-19 19:05:40 UTC
Created attachment 93944 [details] [review]
Improved python bindings for libempathy and libempathy-gtk

* Work out the python installation directory in configure.ac instead of Makefile.am
* Obey --prefix for python module installation
Comment 7 Xavier Claessens 2007-08-19 19:59:10 UTC
I committed with some changes:
1) Moved code from libemapthy(gtk)/python to python/pyempathy(gtk)
2) Replaced the horrible install thing from Makefile.am by some autofoo magic.
3) Changed a bit the configure.ac code to detect if python binding must be compiled.

It would be cool to add an example.py in python/ to demonstrate how to use the
binding.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Note You need to log in before you can comment on or make changes to this bug.