From d87b77e649bee4e4acbc0ab1d2d462673b541e7a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Mar 2010 15:19:13 +1100 Subject: build: reuse SAMBA_LIBRARY() to build python modules This allows the rpath logic to be shared, and simplifies the install logic --- buildtools/wafsamba/samba_python.py | 45 ++++++++++++------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) (limited to 'buildtools/wafsamba/samba_python.py') 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 -- cgit