third_party/wscript: update to handle waf 2.0.4
authorAlexander Bokovoy <ab@samba.org>
Fri, 2 Feb 2018 14:34:33 +0000 (16:34 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Sep 2018 04:37:25 +0000 (06:37 +0200)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
third_party/wscript

index 9a86dfe..c4744b7 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'.