third_party/wscript: update to handle waf 2.0.4
[vlendec/samba-autobuild/.git] / third_party / wscript
index 9a86dfe44e3aedc896f8714240f576b1f83ec5b2..c4744b7a589ea755c939f821db82488328830e0e 100644 (file)
@@ -1,10 +1,9 @@
 #!/usr/bin/env python
 
-import samba_git
-import Options
-import Utils
 import os
 import sys
+import samba_git
+from waflib import Options, Utils
 
 # work out what python external libraries we need to install
 external_pkgs = {
@@ -25,11 +24,11 @@ def find_third_party_module(conf, module, package):
 
     old_path = sys.path
     try:
-        sys.path.append(os.path.join(conf.curdir, os.path.dirname(package)))
+        sys.path.append(os.path.join(conf.path.abspath(), os.path.dirname(package)))
         try:
             __import__(module)
         except ImportError:
-            if samba_git.has_submodules(conf.srcdir):
+            if samba_git.has_submodules(conf.srcnode.abspath()):
                 raise Utils.WafError("""\
 Unable to find Python module '%s'. Please install the system package or check \
 out the relevant submodule by running 'git submodule update --init'.