waf: Simplify handling of python modules.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 13 Nov 2011 16:50:52 +0000 (17:50 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 13 Nov 2011 17:06:06 +0000 (18:06 +0100)
buildtools/wafsamba/samba_python.py
buildtools/wafsamba/wafsamba.py

index f46aacce4706abb22a75402ad6a46a7c8b8777d1..503fa75185a76b01da39d92cecea95297efb6638 100644 (file)
@@ -34,22 +34,10 @@ def SAMBA_PYTHON(bld, name,
 
     source = bld.EXPAND_VARIABLES(source, vars=vars)
 
-    if realname is None:
-        # a SAMBA_PYTHON target without a realname is just a
-        # library with pyembed=True
-        bld.SAMBA_LIBRARY(name,
-                          source=source,
-                          deps=deps,
-                          public_deps=public_deps,
-                          includes=includes,
-                          cflags=cflags,
-                          local_include=local_include,
-                          vars=vars,
-                          pyext=True,
-                          enabled=enabled)
-        return
-
-    link_name = 'python/%s' % realname
+    if realname is not None:
+        link_name = 'python/%s' % realname
+    else:
+        link_name = None
 
     bld.SAMBA_LIBRARY(name,
                       source=source,
@@ -57,13 +45,14 @@ def SAMBA_PYTHON(bld, name,
                       public_deps=public_deps,
                       includes=includes,
                       cflags=cflags,
-                      realname=realname,
                       local_include=local_include,
                       vars=vars,
+                      realname=realname,
                       link_name=link_name,
                       pyext=True,
                       target_type='PYTHON',
                       install_path='${PYTHONARCHDIR}',
+                      allow_undefined_symbols=True,
                       enabled=enabled)
 
 Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON
index 0d9ad74402e719f3eb828277a30c3de371d8a32a..5e4f40d2c4923946707afd4de4ded6407fd6e5ad 100644 (file)
@@ -155,10 +155,6 @@ def SAMBA_LIBRARY(bld, libname, source,
     else:
         subsystem_group = group
 
-    if target_type == "PYTHON":
-        allow_undefined_symbols = True
-        pyext = True
-
     # first create a target for building the object files for this library
     # by separating in this way, we avoid recompiling the C files
     # separately for the install library and the build library