1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/lib/wscript_build
Thomas Nagy 7f3116a63d build: allow the waf build to work with python 3.0 and 3.1
Python 3.x is a bit fussier about print statements and indentation.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-04-08 07:46:39 +10:00

28 lines
767 B
Python

#!/usr/bin/env python
import os, Options
# work out what python external libraries we need to install
external_libs = {
"dns.resolver": "dnspython/dns",
"subunit": "subunit/python/subunit",
"testtools": "testtools/testtools"}
list = []
for module, package in external_libs.items():
try:
__import__(module)
except ImportError:
list.append(package)
for e in list:
bld.INSTALL_WILDCARD('${PYTHONDIR}/samba/external', e + '/**/*', flat=False,
exclude='*.pyc', trim_path=os.path.dirname(e))
bld.SAMBA_GENERATOR('external_init_py',
rule='touch ${TGT}',
target='empty_file')
bld.INSTALL_FILES('${PYTHONDIR}/samba/external', 'empty_file', destname='__init__.py')