Author: jelmer
Date: 2007-09-26 02:06:20 +0000 (Wed, 26 Sep 2007)
New Revision: 25342

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25342

Log:
Some more work getting the ldb and tdb python bindings to work again.
Added:
   branches/4.0-python/source/lib/tdb/swig/tests/
   branches/4.0-python/source/lib/tdb/swig/tests/simple.py
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/output.pm
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/tdb/libtdb.m4
   branches/4.0-python/source/main.mk


Changeset:

Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/build/smb_build/input.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 02:06:20 UTC 
(rev 25342)
@@ -131,7 +131,9 @@
                $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)";
        }
 
-       $lib->{INSTALLDIR} = "LIBDIR";
+       unless(defined($lib->{INSTALLDIR})) {
+               $lib->{INSTALLDIR} = "LIBDIR";
+       }
        add_libreplace($lib);
 }
 
@@ -147,6 +149,8 @@
        $swig->{OUTPUT_TYPE} = ["SHARED_LIBRARY"];
        $swig->{LIBRARY_REALNAME} = "$dirname/_$basename.\$(SHLIBEXT)";
        $swig->{OBJ_FILES} = ["$dirname/$basename\_wrap\.o"];
+       $swig->{INSTALLDIR} = "PYTHONDIR";
+       push (@{$swig->{PUBLIC_DEPENDENCIES}}, "LIBPYTHON");
 
        check_library($INPUT, $swig, ["SHARED_LIBRARY"]);
 }

Modified: branches/4.0-python/source/build/smb_build/output.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/output.pm        2007-09-26 
02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/build/smb_build/output.pm        2007-09-26 
02:06:20 UTC (rev 25342)
@@ -51,7 +51,6 @@
 
        if (defined($lib->{LIBRARY_REALNAME})) {
                $lib->{BASEDIR} =~ s/^\.\///g;
-               $lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}";
                $lib->{SHAREDDIR} = $lib->{BASEDIR};
        } else {
                if ($lib->{TYPE} eq "MODULE") {

Modified: branches/4.0-python/source/lib/python/config.m4
===================================================================
--- branches/4.0-python/source/lib/python/config.m4     2007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/lib/python/config.m4     2007-09-26 02:06:20 UTC 
(rev 25342)
@@ -1520,8 +1520,8 @@
 
 AC_DEFINE_UNQUOTED(PLATFORM, $MACHDEP, [Platforms])
 SMB_SUBSYSTEM(LIBPYTHON, [], [INTERNAL_PYTHON], [-Ilib/python/Include 
-Ilib/python])
-SMB_ENABLE(python)
-SMB_ENABLE(pgen)
+SMB_ENABLE(python, YES)
+SMB_ENABLE(pgen, YES)
 PYTHON="$builddir/bin/python"
 
 else

Modified: branches/4.0-python/source/lib/tdb/libtdb.m4
===================================================================
--- branches/4.0-python/source/lib/tdb/libtdb.m4        2007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/lib/tdb/libtdb.m4        2007-09-26 02:06:20 UTC 
(rev 25342)
@@ -28,5 +28,3 @@
 
 AC_HAVE_DECL(pread, [#include <unistd.h>])
 AC_HAVE_DECL(pwrite, [#include <unistd.h>])
-
-SMB_ENABLE(swig_tdb, NO)

Added: branches/4.0-python/source/lib/tdb/swig/tests/simple.py
===================================================================
--- branches/4.0-python/source/lib/tdb/swig/tests/simple.py     2007-09-26 
02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/lib/tdb/swig/tests/simple.py     2007-09-26 
02:06:20 UTC (rev 25342)
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+# Some simple tests for the TDB python interface
+
+from unittest import TestCase
+from tdb import Tdb
+
+class SimpleTdb(TestCase):
+    def test_open(self):
+        db = Tdb("bla")

Modified: branches/4.0-python/source/main.mk
===================================================================
--- branches/4.0-python/source/main.mk  2007-09-26 02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/main.mk  2007-09-26 02:06:20 UTC (rev 25342)
@@ -29,6 +29,7 @@
 include client/config.mk
 include libcli/config.mk
 include scripting/ejs/config.mk
+include scripting/python/config.mk
 include scripting/swig/config.mk
 include kdc/config.mk
 

Reply via email to