summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_python.py
diff options
context:
space:
mode:
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