From 7ab84481d6b0bee4d1820d9e70950fa126e5269c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Nov 2007 01:20:00 +0100 Subject: r26180: Allow prebuilding swig output files. (This used to be commit 52106ad04edc3e80e3e3feb8d4b2d4e9e945cbbb) --- source4/lib/tdb/Makefile.in | 6 +++++- source4/lib/tdb/autogen.sh | 2 ++ source4/lib/tdb/setup.py | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'source4/lib/tdb') diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in index 651fc654de..9abe5c2b88 100644 --- a/source4/lib/tdb/Makefile.in +++ b/source4/lib/tdb/Makefile.in @@ -21,6 +21,7 @@ SHLD_FLAGS = @SHLD_FLAGS@ PACKAGE_VERSION = @PACKAGE_VERSION@ PICFLAG = @PICFLAG@ SHLIBEXT = @SHLIBEXT@ +SWIG = @SWIG@ .PHONY: test @@ -111,7 +112,10 @@ distclean: clean realdistclean: distclean rm -f configure include/config.h.in -build-python: libtdb.$(SHLIBEXT) +tdb_wrap.c tdb.py: tdb.i + $(SWIG) -python -keyword tdb.i + +build-python: libtdb.$(SHLIBEXT) tdb_wrap.c tdb.py ./setup.py build install-python: diff --git a/source4/lib/tdb/autogen.sh b/source4/lib/tdb/autogen.sh index bf84eeee19..8660843d2b 100755 --- a/source4/lib/tdb/autogen.sh +++ b/source4/lib/tdb/autogen.sh @@ -9,6 +9,8 @@ autoheader $IPATHS || exit 1 rm -rf autom4te.cache +swig -python -keyword tdb.i # Ignore errors for now + echo "Now run ./configure and then make." exit 0 diff --git a/source4/lib/tdb/setup.py b/source4/lib/tdb/setup.py index c0a952d657..8be0c67e0b 100755 --- a/source4/lib/tdb/setup.py +++ b/source4/lib/tdb/setup.py @@ -5,6 +5,7 @@ from distutils.extension import Extension setup(name='tdb', version='1.0', url="http://tdb.samba.org/", - ext_modules=[Extension('_tdb', ['tdb.i'], include_dirs=['include'], - library_dirs=["."], libraries=['tdb'], swig_opts=["-keyword"])], + py_modules=["tdb"], + ext_modules=[Extension('_tdb', ['tdb_wrap.c'], include_dirs=['include'], + library_dirs=["."], libraries=['tdb'])], ) -- cgit