1
# waf build tool for building IDL files with pidl
4
from samba_utils import *
5
from samba_autoconf import *
8
def SAMBA_PYTHON(bld, name,
15
init_function_sentinal=None,
19
'''build a python extension for Samba'''
21
# when we support static python modules we'll need to gather
22
# the list from all the SAMBA_PYTHON() targets
23
if init_function_sentinal is not None:
24
cflags += '-DSTATIC_LIBPYTHON_MODULES=%s' % init_function_sentinal
26
source = bld.EXPAND_VARIABLES(source, vars=vars)
29
# a SAMBA_PYTHON target without a realname is just a
30
# library with pyembed=True
31
bld.SAMBA_LIBRARY(name,
34
public_deps=public_deps,
37
local_include=local_include,
43
link_name = 'python/%s' % realname
45
bld.SAMBA_LIBRARY(name,
48
public_deps=public_deps,
52
local_include=local_include,
57
install_path='${PYTHONDIR}',
60
Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON