summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_python.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-29 15:19:13 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:15 +1000
commitd87b77e649bee4e4acbc0ab1d2d462673b541e7a (patch)
tree52e197f635a800146a6d67da89685792ecff3b90 /buildtools/wafsamba/samba_python.py
parent02f9364bbcafb440be01c733dab49bee2a5138f4 (diff)
downloadsamba-d87b77e649bee4e4acbc0ab1d2d462673b541e7a.tar.gz
samba-d87b77e649bee4e4acbc0ab1d2d462673b541e7a.tar.bz2
samba-d87b77e649bee4e4acbc0ab1d2d462673b541e7a.zip
build: reuse SAMBA_LIBRARY() to build python modules
This allows the rpath logic to be shared, and simplifies the install logic
Diffstat (limited to 'buildtools/wafsamba/samba_python.py')
-rw-r--r--buildtools/wafsamba/samba_python.py45
1 files changed, 14 insertions, 31 deletions
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index cb3df95207..e9fa88c6ec 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -39,38 +39,21 @@ def SAMBA_PYTHON(bld, name,
needs_python=True,
enabled=enabled)
- if not enabled:
- SET_TARGET_TYPE(bld, name, 'DISABLED')
- return
-
- if not SET_TARGET_TYPE(bld, name, 'PYTHON'):
- return
-
- deps += ' ' + public_deps
-
- if realname is None:
- realname = '%s.so' % name
link_name = 'python/%s' % realname
- bld.SET_BUILD_GROUP('main')
-
- t = bld(
- features = 'cc cshlib pyext symlink_lib',
- source = source,
- target = name,
- samba_cflags = CURRENT_CFLAGS(bld, name, cflags),
- samba_includes = includes,
- local_include = local_include,
- samba_deps = TO_LIST(deps),
- link_name = link_name,
- name = name,
- install_path = None
- )
-
- destdir='${PYTHONDIR}'
- dname=os.path.dirname(realname)
- if dname:
- destdir += '/' + dname
- bld.INSTALL_FILES(destdir, name + '.so', destname=os.path.basename(realname))
+ bld.SAMBA_LIBRARY(name,
+ source=source,
+ deps=deps,
+ public_deps=public_deps,
+ includes=includes,
+ cflags=cflags,
+ realname=realname,
+ local_include=local_include,
+ vars=vars,
+ link_name=link_name,
+ needs_python=True,
+ target_type='PYTHON',
+ install_path='${PYTHONDIR}',
+ enabled=enabled)
Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON