r25541: Add setup.py for building ldb python wrappers standalone.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 5 Oct 2007 23:04:46 +0000 (23:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:07:50 +0000 (15:07 -0500)
source/lib/ldb/setup.py [new file with mode: 0755]
source/lib/ldb/swig/ldb.i

diff --git a/source/lib/ldb/setup.py b/source/lib/ldb/setup.py
new file mode 100755 (executable)
index 0000000..e5fcddf
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/python
+from distutils.core import setup
+from distutils.extension import Extension
+setup(name='ldb',
+      version='1.0',
+      ext_modules=[Extension('_ldb', ['swig/ldb.i'], include_dirs=['include'],
+                             libraries=['ldb','ldap'])],
+      )
index a1a08ec72f5b19492c4f40a467015c61e443f822..cdf1d66de1f4db2432329ac105c6d16346567e86 100644 (file)
@@ -36,9 +36,9 @@ typedef long long int64_t;
 
 /* Include headers */
 
-#include "lib/replace/replace.h"
-#include "lib/talloc/talloc.h"
-#include "lib/ldb/include/ldb.h"
+#include <stdbool.h>
+#include "talloc.h"
+#include "ldb.h"
 
 %}
 
@@ -237,3 +237,5 @@ int ldb_msg_sanity_check(struct ldb_context *ldb, const struct ldb_message *msg)
 /* struct ldb_dn *ldb_dn_explode(void *mem_ctx, const char *dn); */
 
 /* char *ldb_dn_linearize(void *mem_ctx, const struct ldb_dn *dn); */
+
+%rename(ldb_context) Ldb;