From fe0febcf304b8ef5eec19b2f3d540ae936e005e3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 2 Apr 2010 08:47:38 +1100 Subject: s4-waf: added new install system for external python libs --- lib/wscript_build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/wscript_build (limited to 'lib/wscript_build') diff --git a/lib/wscript_build b/lib/wscript_build new file mode 100644 index 0000000000..c47dfc01a8 --- /dev/null +++ b/lib/wscript_build @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import os + +# 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}', e + '/**/*', flat=False, + exclude='*.pyc', trim_path=os.path.dirname(e)) -- cgit