beagle r4688 - trunk/libbeagle/wrappers/python



Author: dbera
Date: Sun Apr 13 05:02:23 2008
New Revision: 4688
URL: http://svn.gnome.org/viewvc/beagle?rev=4688&view=rev

Log:
Add version information to the python bindings: beagle.__version__ for package and beagle.__lib_version__ for library version.


Added:
   trunk/libbeagle/wrappers/python/__init__.py.in
Modified:
   trunk/libbeagle/wrappers/python/Makefile.am

Modified: trunk/libbeagle/wrappers/python/Makefile.am
==============================================================================
--- trunk/libbeagle/wrappers/python/Makefile.am	(original)
+++ trunk/libbeagle/wrappers/python/Makefile.am	Sun Apr 13 05:02:23 2008
@@ -1,6 +1,6 @@
 INCLUDES = $(PYTHON_INCLUDES) $(PYBEAGLE_CFLAGS) -I$(top_srcdir)
 
-beagledir = $(pyexecdir)
+beagledir = $(pythondir)/beagle
 beagle_LTLIBRARIES = beagle.la
 beagle_la_LDFLAGS = -module -avoid-version -export-symbols-regex initbeagle
 beagle_la_LIBADD = $(BEAGLE_LIBS) $(top_builddir)/beagle/libbeagle.la
@@ -9,6 +9,14 @@
 
 nodist_beagle_la_SOURCES = beagle.c
 
+beagle_PYTHON = __init__.py
+beagle_PYTHON_IN =$(beagle_PYTHON).in
+
+$(beagle_PYTHON) : $(beagle_PYTHON_IN)
+	sed -e "s|\ VERSION\@|$(VERSION)|g" \
+	    -e "s|\ LIB_VERSION\@|$(LIBBEAGLE_VERSION_INFO)|" \
+	< $(srcdir)/$(beagle_PYTHON_IN) > $@
+
 EXAMPLE_DIR = $(srcdir)/examples
 EXAMPLES =					\
 	$(EXAMPLE_DIR)/beagle-async-snippet.py	\

Added: trunk/libbeagle/wrappers/python/__init__.py.in
==============================================================================
--- (empty file)
+++ trunk/libbeagle/wrappers/python/__init__.py.in	Sun Apr 13 05:02:23 2008
@@ -0,0 +1,24 @@
+"""Python library to access Beagle search and indexing service.
+
+This library is the python bindings for BeagleClient,
+which can be used to query Beagle or submit data
+for indexing.
+
+For more information on Beagle, see
+    http://beagle-project.org
+
+This library is basically a wrapper over Libbeagle, the C
+bindings. For API documentation, follow the Libbeagle
+documentation
+    http://beagle-project.org/doc/libbeagle/
+
+Some example programs can be found at
+    http://svn.gnome.org/viewvc/beagle/trunk/libbeagle/wrappers/python/examples/
+"""
+
+__version__	= '@VERSION@'
+__lib_version__	= '@LIB_VERSION@'
+__url__		= 'http://beagle-project.org'
+
+from beagle import *
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]