After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
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:
 
 
Reported: 2007-07-17 14:59 UTC by Michael Sheldon
Modified: 2007-08-19 19:59 UTC
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 | Review
Improved python bindings for libempathy and libempathy-gtk (89.10 KB, patch)
2007-08-17 00:22 UTC, Michael Sheldon
none Details | Review
Improved python bindings for libempathy and libempathy-gtk (89.07 KB, patch)
2007-08-17 10:22 UTC, Michael Sheldon
none Details | Review
Improved python bindings for libempathy and libempathy-gtk (89.26 KB, patch)
2007-08-19 19:05 UTC, Michael Sheldon
reviewed Details | 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.