1 # waf build tool for building IDL files with pidl
3 from TaskGen
import taskgen
, before
4 import Build
, os
, string
, Utils
5 from samba_utils
import *
6 from samba_autoconf
import *
9 def SAMBA_PYTHON(bld
, name
,
16 init_function_sentinal
=None,
19 '''build a python extension for Samba'''
22 SET_TARGET_TYPE(bld
, name
, 'DISABLED')
25 if not SET_TARGET_TYPE(bld
, name
, 'PYTHON'):
28 deps
+= ' ' + public_deps
30 # when we support static python modules we'll need to gather
31 # the list from all the SAMBA_PYTHON() targets
32 if init_function_sentinal
is not None:
33 cflags
+= '-DSTATIC_LIBPYTHON_MODULES="%s"' % init_function_sentinal
36 features
= 'cc cshlib pyext',
39 ccflags
= CURRENT_CFLAGS(bld
, name
, cflags
),
40 samba_includes
= includes
,
41 local_include
= local_include
,
42 samba_deps
= TO_LIST(deps
)
44 Build
.BuildContext
.SAMBA_PYTHON
= SAMBA_PYTHON