auth/spnego: remove unused indentation level from gensec_spnego_parse_negTokenInit()
[Samba.git] / python / wscript
blob211fac4de620c9cd21cc9103a682ef7ac87c2c38
1 #!/usr/bin/env python
3 import os
5 def configure(conf):
6 kerberos_py = conf.srcdir + "/python/samba/provision/kerberos_implementation.py"
8 f = open(kerberos_py, 'w')
9 try:
10 header = """#
11 # Copyright (c) 2016 Andreas Schneider <asn@samba.org>
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 3 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 """
27 f.write(header)
29 data = """kdb_modules_dir = "{0}"
30 """
32 if conf.env.HEIMDAL_KRB5_CONFIG:
33 f.write(data.format("", ""))
34 else:
35 modulesdir = "%s/krb5/plugins/kdb" % conf.env.LIBDIR
37 f.write(data.format(modulesdir))
38 finally:
39 f.close()
41 def build(bld):
42 bld.SAMBA_LIBRARY('samba_python',
43 source=[],
44 deps='''
45 LIBPYTHON
46 pytalloc-util
47 pyrpc_util
48 ''',
49 grouping_library=True,
50 private_library=True,
51 pyembed=True,
52 enabled=bld.PYTHON_BUILD_IS_ENABLED())
54 for env in bld.gen_python_environments():
55 pytalloc_util = bld.pyembed_libname('pytalloc-util')
56 pyparam_util = bld.pyembed_libname('pyparam_util')
57 libpython = bld.pyembed_libname('LIBPYTHON')
59 bld.SAMBA_PYTHON('python_glue',
60 source='pyglue.c',
61 deps='''
63 samba-util
64 netif
66 ''' % (pyparam_util, pytalloc_util),
67 realname='samba/_glue.so')
69 bld.SAMBA_SUBSYSTEM(libpython,
70 source='modules.c',
71 public_deps='',
72 init_function_sentinel='{NULL,NULL}',
73 deps='talloc',
74 pyext=True,
75 enabled=bld.PYTHON_BUILD_IS_ENABLED())
77 if bld.PYTHON_BUILD_IS_ENABLED():
78 for env in bld.gen_python_environments():
79 # install out various python scripts for use by make test
80 bld.SAMBA_SCRIPT('samba_python_files',
81 pattern='samba/**/*.py',
82 installdir='python')
84 bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False)