Revision: 1633
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1633&view=rev
Author:   nicholas
Date:     2007-07-12 06:15:26 -0700 (Thu, 12 Jul 2007)

Log Message:
-----------
Add version and version_info attributes to the Python bindings

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/bindings/python/gpod.i.in
    libgpod/trunk/bindings/python/tests/tests.py
    libgpod/trunk/configure.ac

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2007-07-12 04:29:15 UTC (rev 1632)
+++ libgpod/trunk/ChangeLog     2007-07-12 13:15:26 UTC (rev 1633)
@@ -1,3 +1,8 @@
+2007-07-12  Nicholas Piper  <nicholas at users.sourceforge.net>
+
+       * bindings/python/gpod.i.in: Add version and version_info
+       attributes to the Python bindings
+
 2007-07-11  Todd Zullinger <tmzullinger at users.sourceforge.net>
 
        * bindings/python/Makefile.am:

Modified: libgpod/trunk/bindings/python/gpod.i.in
===================================================================
--- libgpod/trunk/bindings/python/gpod.i.in     2007-07-12 04:29:15 UTC (rev 
1632)
+++ libgpod/trunk/bindings/python/gpod.i.in     2007-07-12 13:15:26 UTC (rev 
1633)
@@ -38,6 +38,13 @@
 interface."
 %enddef
 
+%pythoncode %{
+version_info = (@LIBGPOD_MAJOR_VERSION@, 
+               @LIBGPOD_MINOR_VERSION@, 
+               @LIBGPOD_MICRO_VERSION@)
+version = '.'.join(map(str, version_info))  
+%}
+
 %module(docstring=DOCSTRING) gpod
 %{
 #include "db-artwork-debug.h" 
@@ -50,6 +57,7 @@
 #include "itdb_private.h"
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+
 /* include prototypes for all functions so builds using
  * -Wmissing-prototypes don't fail. */
 PyObject* sw_get_tracks(Itdb_iTunesDB *itdb);

Modified: libgpod/trunk/bindings/python/tests/tests.py
===================================================================
--- libgpod/trunk/bindings/python/tests/tests.py        2007-07-12 04:29:15 UTC 
(rev 1632)
+++ libgpod/trunk/bindings/python/tests/tests.py        2007-07-12 13:15:26 UTC 
(rev 1633)
@@ -2,6 +2,7 @@
 import shutil
 import tempfile
 import os
+import types
 
 gpod = __import__('__init__')
 
@@ -61,6 +62,9 @@
             self.assertEqual(len(self.db),n)
             self.db.remove(track, ipod=True)
             self.failIf(os.path.exists(track_file))
-            
+
+    def testVersion(self):
+        self.assertEqual(type(gpod.version_info), 
+                         types.TupleType)
 if __name__ == '__main__':
     unittest.main()

Modified: libgpod/trunk/configure.ac
===================================================================
--- libgpod/trunk/configure.ac  2007-07-12 04:29:15 UTC (rev 1632)
+++ libgpod/trunk/configure.ac  2007-07-12 13:15:26 UTC (rev 1633)
@@ -27,6 +27,9 @@
 LIBGPOD_SO_VERSION=2:0:0
 
 AC_SUBST(LIBGPOD_SO_VERSION)
+AC_SUBST(LIBGPOD_MAJOR_VERSION)
+AC_SUBST(LIBGPOD_MINOR_VERSION)
+AC_SUBST(LIBGPOD_MICRO_VERSION)
 AC_SUBST(LIBGPOD_VERSION)
 
 AM_INIT_AUTOMAKE(libgpod, $LIBGPOD_VERSION)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to