From f30dfc1e68ca48c332ca11e6c6c2d4d167fb978e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 21 Nov 2018 14:47:38 +0100 Subject: Build scripts: Implement --quiet Add a _verbose setting to the utils module and set it depending on option --quiet. Depending on this, suppress the messages about copying files, shortening the build log by over 1000 lines. Change-Id: I3f9abce3b145d43c4fe615f624ca4e2769a269f8 Reviewed-by: Alexandru Croitor --- build_scripts/main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'build_scripts/main.py') diff --git a/build_scripts/main.py b/build_scripts/main.py index fdc5f4a08..b57e4978b 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -43,7 +43,7 @@ from distutils.version import LooseVersion import os import time from .config import config -from .utils import memoize, get_python_dict +from .utils import memoize, get_python_dict, set_quiet from .options import * setup_script_dir = os.getcwd() @@ -911,8 +911,11 @@ class PysideBuild(_build): module_src_dir = os.path.join(self.sources_dir, extension) # Build module - cmake_cmd = [ - OPTION_CMAKE, + cmake_cmd = [OPTION_CMAKE] + if OPTION_QUIET: + set_quiet(True) + cmake_cmd.append('--quiet') + cmake_cmd += [ "-G", self.make_generator, "-DBUILD_TESTS={}".format(self.build_tests), "-DQt5Help_DIR={}".format(self.qtinfo.docs_dir), @@ -1308,8 +1311,9 @@ class PysideBuild(_build): if not os.path.exists(srcpath): continue rpath_cmd(srcpath) - print("Patched rpath to '$ORIGIN/' (Linux) or " - "updated rpath (OS/X) in {}.".format(srcpath)) + if not OPTION_QUIET: + print("Patched rpath to '$ORIGIN/' (Linux) or " + "updated rpath (OS/X) in {}.".format(srcpath)) cmd_class_dict = { -- cgit v1.2.3