1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00
samba-mirror/lib/wscript_build
Andrew Tridgell 64594f296c s4-waf: replace TOUCH_FILE() with normal install rules
this allows it to work with 'waf uninstall'
2010-04-06 20:27:26 +10:00

29 lines
824 B
Python

#!/usr/bin/env python
import os, Options
from samba_utils import TOUCH_FILE, EXPAND_VARIABLES
# 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.iteritems():
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')