ctdb/wscript: adopt to waf-2.0
authorAlexander Bokovoy <ab@samba.org>
Fri, 15 Jun 2018 14:01:59 +0000 (17:01 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Sep 2018 04:37:26 +0000 (06:37 +0200)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
ctdb/wscript

index 01278464db349f208cfe296753f801ca1ec69332..865f0d9b69e41755b79fa339b698f755497a7816 100644 (file)
@@ -12,7 +12,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
     srcdir = srcdir + '/..'
 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
 
-from waflib import Options, Logs, Utils
+from waflib import Options, Logs, Errors
 import wafsamba, samba_dist
 import samba_utils, samba_version
 
@@ -103,7 +103,6 @@ def options(opt):
 
 
 def configure(conf):
-
     # No need to build python bindings for talloc/tevent/tdb
     if conf.IN_LAUNCH_DIR():
         conf.env.standalone_ctdb = True
@@ -140,7 +139,7 @@ def configure(conf):
             conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
     else:
         if not conf.CHECK_POPT():
-            raise Utils.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
+            raise Errors.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
         else:
             conf.define('USING_SYSTEM_POPT', 1)
         conf.env.SOCKET_WRAPPER_SO_PATH = ''
@@ -148,7 +147,7 @@ def configure(conf):
 
         if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
             if not conf.CHECK_SOCKET_WRAPPER():
-                raise Utils.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+                raise Errors.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
             else:
                 conf.define('USING_SYSTEM_SOCKET_WRAPPER', 1)
                 conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
@@ -1116,7 +1115,7 @@ def testonly(ctx):
 
 
 def test(ctx):
-    import Scripting
+    from waflib import Scripting
     Scripting.commands.append('build')
     Scripting.commands.append('testonly')
 
@@ -1184,7 +1183,7 @@ def distonly(ctx):
 
 
 def dist():
-    import Scripting
+    from waflib import Scripting
     Scripting.commands.append('manpages')
     Scripting.commands.append('distonly')
 
@@ -1199,7 +1198,7 @@ def rpmonly(ctx):
 
 
 def rpm(ctx):
-    import Scripting
+    from waflib import Scripting
     Scripting.commands.append('manpages')
     Scripting.commands.append('distonly')
     Scripting.commands.append('rpmonly')
@@ -1207,7 +1206,7 @@ def rpm(ctx):
 
 def ctags(ctx):
     "build 'tags' file using ctags"
-    import Utils
+    from waflib import Utils
     source_root = os.path.dirname(Utils.g_module.root_path)
     cmd = 'ctags $(find %s -name "*.[ch]")' % source_root
     print("Running: %s" % cmd)