aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/config.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-11-28 17:05:08 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-12-07 12:41:43 +0000
commit9fa13b2c5f43d6fbaeb4360ac54391a91b3e9e54 (patch)
tree61887ff3f838bf890bbd6d95302e862d829da9a0 /build_scripts/config.py
parent4d82ee992992251bcadf0097a4df60fe7c3b7ef8 (diff)
Make quiet builds really quiet
The change does a couple of things: - Sets the distutils / setuptools --verbose option to 0 - Sets the distutils / setuptools --quiet option to 1 - The options above end up calling distutils.log.set_verbosity(0) - Passes the QUIET_BUILD cmake option from setup.py to every CMake invocation, when --quiet is passed to setup.py - Sets the CMAKE_INSTALL_MESSAGE variable to silence messages regarding installation of files - Sets the CMAKE_RULE_MESSAGES variable to disable progress report in makefiles when building each source file - Overrides the CMake message function, not to display STATUS / info / untyped messages (still displays warnings and errors) - Changes the build / install elapsed time messages to always be printed even in quiet mode - Reverts the previously introduced set_quiet function in utils, because log.set_verbosity() now takes care of silencing those messages As a result, there's a lot less clutter when doing a quiet build. Warnings, errors and shiboken output is still displayed. Change-Id: Ie05c593ce7dc0aa04554c2d2859ce655233ddb9f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/config.py')
-rw-r--r--build_scripts/config.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_scripts/config.py b/build_scripts/config.py
index 78d7d404..f47230a6 100644
--- a/build_scripts/config.py
+++ b/build_scripts/config.py
@@ -99,7 +99,8 @@ class Config(object):
def init_config(self, build_type=None, internal_build_type=None,
cmd_class_dict=None, package_version=None,
- ext_modules=None, setup_script_dir=None):
+ ext_modules=None, setup_script_dir=None,
+ quiet=False):
"""
Sets up the global singleton config which is used in many parts
of the setup process.
@@ -135,6 +136,11 @@ class Config(object):
setup_kwargs['cmdclass'] = cmd_class_dict
setup_kwargs['version'] = package_version
+ if quiet:
+ # Tells distutils / setuptools to be quiet, and only print warnings or errors.
+ # Makes way less noise in the terminal when building.
+ setup_kwargs['verbose'] = 0
+
# Setting these two keys is still a bit of a discussion point.
# In general not setting them will allow using "build" and
# "bdist_wheel" just fine. What they do, is they specify to the