1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

r26177: Allow prebuilding swig wrapper, install ldb.py.

(This used to be commit e61160dce4)
This commit is contained in:
Jelmer Vernooij
2007-11-27 23:28:23 +01:00
committed by Stefan Metzmacher
parent 84945d9fae
commit 8463b9aff9
3 changed files with 10 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ VPATH = @srcdir@:@tdbdir@:@tallocdir@:@libreplacedir@:@poptdir@
srcdir = @srcdir@ srcdir = @srcdir@
builddir = @builddir@ builddir = @builddir@
SLAPD = @SLAPD@ SLAPD = @SLAPD@
SWIG = swig
EXTRA_OBJ=@EXTRA_OBJ@ EXTRA_OBJ=@EXTRA_OBJ@
TESTS=test-tdb.sh @TESTS@ TESTS=test-tdb.sh @TESTS@
@@ -232,11 +233,14 @@ etags:
ctags: ctags:
ctags `find $(srcdir) -name "*.[ch]"` ctags `find $(srcdir) -name "*.[ch]"`
%_wrap.c %.py: %.i
$(SWIG) -python -keyword $<
# Python bindings # Python bindings
build-python: lib/libldb.$(SHLIBEXT) build-python: lib/libldb.$(SHLIBEXT) ldb_wrap.c ldb.py
./setup.py build ./setup.py build
install-python: install-python: build-python
./setup.py install --prefix=$(prefix) ./setup.py install --prefix=$(prefix)
check-python: build-python check-python: build-python

View File

@@ -17,6 +17,8 @@ autoconf $IPATHS || exit 1
rm -rf autom4te.cache rm -rf autom4te.cache
swig -python ldb.i # Ignore errors, for now
echo "Now run ./configure and then make." echo "Now run ./configure and then make."
exit 0 exit 0

View File

@@ -9,7 +9,7 @@ setup(name="ldb",
author_email="ldb@samba.org", author_email="ldb@samba.org",
license="LGPLv3", license="LGPLv3",
keywords=["ldap","ldb","db","ldif"], keywords=["ldap","ldb","db","ldif"],
ext_modules=[Extension('_ldb', ['ldb.i'], include_dirs=['include'], py_modules=["ldb"],
swig_opts=["-keyword"], ext_modules=[Extension('_ldb', ['ldb_wrap.c'], include_dirs=['include'],
library_dirs=["lib"], libraries=['ldb','ldap'])], library_dirs=["lib"], libraries=['ldb','ldap'])],
) )