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 319417 - [PATCH] Python bindings for libbeagle
[PATCH] Python bindings for libbeagle
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
0.1.x
Other All
: Normal enhancement
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2005-10-21 14:18 UTC by Raphael Slinckx
Modified: 2005-11-14 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
beaglesearch.py (964 bytes, text/plain)
2005-10-21 14:23 UTC, Raphael Slinckx
  Details
pybeagle.tar.bz2 (4.66 KB, application/x-bzip)
2005-10-21 14:30 UTC, Raphael Slinckx
  Details
pybeagle.diff (4.94 KB, patch)
2005-10-21 19:17 UTC, Raphael Slinckx
none Details | Review
pybeage.tar.gz (5.08 KB, application/x-gzip)
2005-10-21 19:21 UTC, Raphael Slinckx
  Details

Description Raphael Slinckx 2005-10-21 14:18:00 UTC
The attached files provide a python binding for libbeagle. I'm using it for
deskbar-applet module in gnome CVS, maybe it's worth pushing it upstream.
Comment 1 Raphael Slinckx 2005-10-21 14:23:00 UTC
Created attachment 53732 [details]
beaglesearch.py

Sample python script demonstrating the beagle searching, ported from the C
libbeagle examples
Comment 2 Raphael Slinckx 2005-10-21 14:30:45 UTC
Created attachment 53734 [details]
pybeagle.tar.bz2

The package containing the needed files for binding libbeagle.

NOT attached is the configure.ac snippet needed to build it.

You can try the binding by checking out deskbar-applet module from gnome CVS:
cvs -d :pserver:anoncvs@anoncvs.gnome.org:/cvs/gnome co deskbar-applet
cd deskbar-applet
./autogen --enable-beagle
cd deskbar/beagle
ln -s .libs/_beagle.so _beagle.so
cd ../
python beaglesearch.py

It *should* work, if i get the approval to go on, i'll provide a patch for
beagle's build system. Please let me know where to place the bindings itself.
Comment 3 Jon Trowbridge 2005-10-21 15:41:56 UTC
Raphael: Very cool!  We should definitely distribute these bindings along as
part of Beagle.  Please don't hold back: go ahead and integrate this stuff into
our build.  

I think the bindings should probably go into a subdirectory under our top-level
directory.  i.e. beagle/pybeagle
Comment 4 Veerapuram Varadhan 2005-10-21 16:31:47 UTC
Jon, Raphael:  Wouldn't it be nice to have a wrappers/, that would have
wrappers/glib, wrappers/python, wrappers/ruby etc?
Comment 5 Fredrik Hedberg 2005-10-21 16:56:43 UTC
Yeah, and subversion.
Comment 6 Raphael Slinckx 2005-10-21 18:46:21 UTC
Ok, i'll put the bindings in beagle/wrappers/python, they will install a beagle
module in /usr/lib/python2.x/site-packages/beagle.so.

Patch to follow, today or tomorrow depending on the time i have.
Comment 7 Raphael Slinckx 2005-10-21 19:17:48 UTC
Created attachment 53746 [details] [review]
pybeagle.diff

This is the patch for beagle's buildsystem.

It may need a bit of work, cause currently even if you --disable-python i think
you must have the deps, so it's a bad thing.

I do not know enough of autoconf to make this, i'm sure you will be able to
sort it out easily, all the elements are there.
Comment 8 Raphael Slinckx 2005-10-21 19:21:39 UTC
Created attachment 53747 [details]
pybeage.tar.gz

The tarball to be decompressed in beagle root dir.

It creates a wrappers/python directory with makefiles and source files.
Everything must be added to CVS.

the .defs file is semi-autogenerated, i had to tweak it a little, in case of
API change use meld to merge the difference between the .defs.new generated by
gen-defs.sh
Comment 9 Raphael Slinckx 2005-10-21 19:22:35 UTC
Also, the example should be placed somewhere, i don't know exactly, you can
figure that out, i suppose.
Comment 10 Joe Shaw 2005-11-14 22:21:24 UTC
These are now in CVS.