summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-13 17:50:52 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-13 18:06:06 +0100
commitaf5c6fba68a05e9e196f4e9133b07cb1d62cc981 (patch)
treea4b63af6a25e2033e5eb3d03f24166c549101db7
parent126209d2e593be55c69ce9ae9462ea441bbb3ce1 (diff)
downloadsamba-af5c6fba68a05e9e196f4e9133b07cb1d62cc981.tar.gz
samba-af5c6fba68a05e9e196f4e9133b07cb1d62cc981.tar.bz2
samba-af5c6fba68a05e9e196f4e9133b07cb1d62cc981.zip
waf: Simplify handling of python modules.
-rw-r--r--buildtools/wafsamba/samba_python.py23
-rw-r--r--buildtools/wafsamba/wafsamba.py4
2 files changed, 6 insertions, 21 deletions
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index f46aacce47..503fa75185 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -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
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 0d9ad74402..5e4f40d2c4 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -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