From e00e6bd1c225e8e5a8ccb99dc844ae9bfbb45e74 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Jul 2019 07:36:30 +0530 Subject: [PATCH] Dont print "done" when doing nothing --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1d610bca9..e6688da98 100755 --- a/setup.py +++ b/setup.py @@ -385,6 +385,7 @@ def parallel_run(items): elif compile_cmd.on_success is not None: compile_cmd.on_success() + printed = False while items and failed is None: while len(workers) < num_workers and items: compile_cmd = items.pop() @@ -393,12 +394,13 @@ def parallel_run(items): print(' '.join(compile_cmd.cmd)) else: print('\r\x1b[K[{}/{}] {}'.format(num, total, compile_cmd.desc), end='') + printed = True w = subprocess.Popen(compile_cmd.cmd, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT) workers[w.pid] = compile_cmd, w wait() while len(workers): wait() - if not verbose: + if not verbose and printed: print(' done') if failed: print(failed.desc)