summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2018-02-02 16:34:33 +0200
committerAndrew Bartlett <abartlet@samba.org>2018-09-05 06:37:25 +0200
commitc73b7795b8769ec038f2ed61ce192148d12b5646 (patch)
treee0119afb86ae631295b17831b2257a17a4d06a6b /wscript
parent0119a8791ca0ec728df8f7b7de00d813fec30857 (diff)
downloadsamba-c73b7795b8769ec038f2ed61ce192148d12b5646.tar.gz
wscript: update to handle waf 2.0.4
Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'wscript')
-rw-r--r--wscript15
1 files changed, 11 insertions, 4 deletions
diff --git a/wscript b/wscript
index b441849f76b..dd4ceca9bc8 100644
--- a/wscript
+++ b/wscript
@@ -8,9 +8,9 @@ VERSION=None
import sys, os, tempfile
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
-import wafsamba, Options, samba_dist, samba_git, Scripting, Utils, samba_version
-import Logs, samba_utils
import shutil
+import wafsamba, samba_dist, samba_git, samba_version, samba_utils
+from waflib import Options, Scripting, Utils, Logs, Context
samba_dist.DIST_DIRS('.')
samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions')
@@ -32,7 +32,14 @@ def system_mitkrb5_callback(option, opt, value, parser):
del parser.rargs[:len(value)]
setattr(parser.values, option.dest, value)
-def set_options(opt):
+def options(opt):
+ # A bit of 'magic' as waf 2.x changed Options.options to be
+ # a different structure than just a dict and it cannot be
+ # filled before all options parsed
+ # ConfigurationContext looks for multiple places for these
+ # settings, including Context.OUT and Context.TOP
+ setattr(Context.g_module, Context.OUT, blddir)
+ setattr(Context.g_module, Context.TOP, srcdir)
opt.BUILTIN_DEFAULT('NONE')
opt.PRIVATE_EXTENSION_DEFAULT('samba4')
opt.RECURSE('lib/audit_logging')
@@ -100,7 +107,7 @@ def set_options(opt):
gr = opt.option_group('developer options')
- opt.tool_options('python') # options for disabling pyc or pyo compilation
+ opt.load('python') # options for disabling pyc or pyo compilation
# enable options related to building python extensions