torture-krb5: Provide a generic handler to catch and print unexpected KRB_ERROR packets
[kai/samba-autobuild/.git] / lib / wscript_build
1 #!/usr/bin/env python
2
3 import os, Options
4
5 # work out what python external libraries we need to install
6 external_libs = {
7     "subunit": "subunit/python/subunit",
8     "testtools": "testtools/testtools",
9     "extras": "extras/extras",
10     "mimeparse": "mimeparse/mimeparse",
11     }
12
13 list = []
14
15 for module, package in external_libs.items():
16     try:
17         __import__(module)
18     except ImportError:
19         list.append(package)
20
21 for e in list:
22     bld.INSTALL_WILDCARD('${PYTHONARCHDIR}/samba/external', e + '/**/*', flat=False,
23                          exclude='*.pyc', trim_path=os.path.dirname(e))
24
25 bld.SAMBA_GENERATOR('external_init_py',
26                     rule='touch ${TGT}',
27                     target='empty_file')
28
29 bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/external', 'empty_file', destname='__init__.py')
30
31 # a grouping library for event and socket related subsystems
32 bld.SAMBA_LIBRARY('samba-sockets',
33                   source=[],
34                   private_library=True,
35                   grouping_library=True,
36                   deps='LIBTSOCKET samba_socket tevent-util')