diff options
author | Andreas Schneider <asn@samba.org> | 2019-06-03 10:40:55 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-06-05 15:40:23 +0000 |
commit | aabdcc91513e242c4f191e1bbbb70c890416d213 (patch) | |
tree | 7fe2a6d63a3e695031eeac56802f864df99c4b8e /third_party/waf/waflib/Scripting.py | |
parent | 952437b1bdbe000c217836c4ecd59406e92146d7 (diff) | |
download | samba-aabdcc91513e242c4f191e1bbbb70c890416d213.tar.gz |
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 <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party/waf/waflib/Scripting.py')
-rw-r--r-- | third_party/waf/waflib/Scripting.py | 15 |
1 files changed, 11 insertions, 4 deletions
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) |