summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/events/config.mk6
-rw-r--r--source4/lib/events/tests.py2
-rw-r--r--source4/lib/ldb/python.mk6
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py4
-rw-r--r--source4/lib/registry/config.mk6
-rw-r--r--source4/lib/registry/tests/bindings.py2
-rw-r--r--source4/lib/tdb/python.mk7
7 files changed, 25 insertions, 8 deletions
diff --git a/source4/lib/events/config.mk b/source4/lib/events/config.mk
index 3a20770427..ca47f0d1c4 100644
--- a/source4/lib/events/config.mk
+++ b/source4/lib/events/config.mk
@@ -52,7 +52,11 @@ LIBEVENTS_OBJ_FILES = $(addprefix $(libeventssrcdir)/, events.o events_timed.o e
PUBLIC_HEADERS += $(addprefix $(libeventssrcdir)/, events.h events_internal.h)
[PYTHON::swig_events]
-SWIG_FILE = events.i
+LIBRARY_REALNAME = samba/_events.$(SHLIBEXT)
PRIVATE_DEPENDENCIES = LIBEVENTS LIBSAMBA-HOSTCONFIG
swig_events_OBJ_FILES = $(libeventssrcdir)/events_wrap.o
+
+$(eval $(call python_py_module_template,samba/events.py,$(libeventssrcdir)/events.py))
+
+$(swig_events_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/events/tests.py b/source4/lib/events/tests.py
index b14f7e6250..006426207e 100644
--- a/source4/lib/events/tests.py
+++ b/source4/lib/events/tests.py
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-import events
+from samba import events
import unittest
# Just test the bindings are there and that calling them doesn't crash
diff --git a/source4/lib/ldb/python.mk b/source4/lib/ldb/python.mk
index 448cc3ed60..7b430f4e2f 100644
--- a/source4/lib/ldb/python.mk
+++ b/source4/lib/ldb/python.mk
@@ -1,6 +1,10 @@
[PYTHON::swig_ldb]
+LIBRARY_REALNAME = _ldb.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBLDB
CFLAGS = -Ilib/ldb/include
-SWIG_FILE = ldb.i
swig_ldb_OBJ_FILES = lib/ldb/ldb_wrap.o
+
+$(eval $(call python_py_module_template,ldb.py,lib/ldb/ldb.py))
+
+$(swig_ldb_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 7cbe6e5e7d..c76222c207 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -10,14 +10,14 @@ sys.path.append("bin/python")
import samba.getopt as options
-from auth import system_session
+from samba.auth import system_session
from ldb import (SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError,
LDB_ERR_NO_SUCH_OBJECT, LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS,
LDB_ERR_ENTRY_ALREADY_EXISTS, LDB_ERR_UNWILLING_TO_PERFORM,
LDB_ERR_NOT_ALLOWED_ON_NON_LEAF, LDB_ERR_OTHER)
from samba import Ldb
from subunit import SubunitTestRunner
-import param
+from samba import param
import unittest
parser = optparse.OptionParser("ldap [options] <host>")
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index c0ad613c52..90618ffc31 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -105,7 +105,11 @@ torture_registry_OBJ_FILES = $(addprefix $(libregistrysrcdir)/tests/, generic.o
$(eval $(call proto_header_template,$(libregistrysrcdir)/tests/proto.h,$(torture_registry_OBJ_FILES:.o=.c)))
[PYTHON::swig_registry]
+LIBRARY_REALNAME = samba/_registry.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = registry
-SWIG_FILE = registry.i
swig_registry_OBJ_FILES = $(libregistrysrcdir)/registry_wrap.o
+
+$(eval $(call python_py_module_template,samba/registry.py,lib/registry/registry.py))
+
+$(swig_registry_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
diff --git a/source4/lib/registry/tests/bindings.py b/source4/lib/registry/tests/bindings.py
index 314cf778a1..1fb5c70b70 100644
--- a/source4/lib/registry/tests/bindings.py
+++ b/source4/lib/registry/tests/bindings.py
@@ -19,7 +19,7 @@
import os
import unittest
-import registry
+from samba import registry
import samba.tests
class HelperTests(unittest.TestCase):
diff --git a/source4/lib/tdb/python.mk b/source4/lib/tdb/python.mk
index 2d61545b7f..e71a60f233 100644
--- a/source4/lib/tdb/python.mk
+++ b/source4/lib/tdb/python.mk
@@ -1,5 +1,10 @@
[PYTHON::swig_tdb]
-SWIG_FILE = tdb.i
+LIBRARY_REALNAME = _tdb.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBTDB DYNCONFIG
swig_tdb_OBJ_FILES = lib/tdb/tdb_wrap.o
+
+$(eval $(call python_py_module_template,tdb.py,lib/tdb/tdb.py))
+
+$(swig_tdb_OBJ_FILES): CFLAGS+="$(CFLAG_NO_UNUSED_MACROS) $(CFLAG_NO_CAST_QUAL)"
+