From aabdcc91513e242c4f191e1bbbb70c890416d213 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 3 Jun 2019 10:40:55 +0200 Subject: third_party: Update waf to version 2.0.17 This fixes building Samba, libtalloc, libtevent, libtdb and libldb with Python 3.8. wget https://waf.io/waf-2.0.17.tar.bz2 tar -xf waf-2.0.17.tar.bz2 git rm third_party/waf/waflib/ -r mkdir third_party/waf -p rsync -a waf-2.0.17/waflib/ third_party/waf/waflib/ git add third_party/waf/waflib/ (Then update version number in buildtools/bin/waf and buildtools/wafsamba/wafsamba.py) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13960 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Signed-off-by: Andrew Bartlett --- third_party/waf/waflib/Scripting.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'third_party/waf/waflib/Scripting.py') diff --git a/third_party/waf/waflib/Scripting.py b/third_party/waf/waflib/Scripting.py index 18203d52701..ae17a8b4503 100644 --- a/third_party/waf/waflib/Scripting.py +++ b/third_party/waf/waflib/Scripting.py @@ -122,7 +122,8 @@ def waf_entry_point(current_directory, version, wafdir): if no_climb: break - if not Context.run_dir: + wscript = os.path.normpath(os.path.join(Context.run_dir, Context.WSCRIPT_FILE)) + if not os.path.exists(wscript): if options.whelp: Logs.warn('These are the generic options (no wscript/project found)') ctx.parser.print_help() @@ -137,7 +138,7 @@ def waf_entry_point(current_directory, version, wafdir): sys.exit(1) try: - set_main_module(os.path.normpath(os.path.join(Context.run_dir, Context.WSCRIPT_FILE))) + set_main_module(wscript) except Errors.WafError as e: Logs.pprint('RED', e.verbose_msg) Logs.error(str(e)) @@ -215,7 +216,10 @@ def parse_options(): ctx = Context.create_context('options') ctx.execute() if not Options.commands: - Options.commands.append(default_cmd) + if isinstance(default_cmd, list): + Options.commands.extend(default_cmd) + else: + Options.commands.append(default_cmd) if Options.options.whelp: ctx.parser.print_help() sys.exit(0) @@ -279,7 +283,7 @@ def distclean_dir(dirname): pass try: - shutil.rmtree('c4che') + shutil.rmtree(Build.CACHE_DIR) except OSError: pass @@ -597,12 +601,15 @@ def autoconfigure(execute_method): cmd = env.config_cmd or 'configure' if Configure.autoconfig == 'clobber': tmp = Options.options.__dict__ + launch_dir_tmp = Context.launch_dir if env.options: Options.options.__dict__ = env.options + Context.launch_dir = env.launch_dir try: run_command(cmd) finally: Options.options.__dict__ = tmp + Context.launch_dir = launch_dir_tmp else: run_command(cmd) run_command(self.cmd) -- cgit v1.2.1