diff options
| author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-04-07 16:09:33 +0200 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-04-09 11:45:58 +0200 |
| commit | e4c51dac4ec2b3d6c6c14ca63d62c11bade62909 (patch) | |
| tree | 08ae82c02c3827ea05394ba60ad64ca89a65a139 /build_scripts/main.py | |
| parent | fca1416b4f4aedc640f05a8183e04b67ea117495 (diff) | |
doc: skip the documentation build by default
This reverse the current approach of building the documentation
by default, and replace the skip-docs parameter by a build-docs one.
A warning is printed when the --skip-docs is used,
and another warning is displayed when using --doc-build-online
without the --build-docs option.
Change-Id: I2bf8302881b51e9831795a7e881b106022cdffa8
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/main.py')
| -rw-r--r-- | build_scripts/main.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index 75850691b..d44fa2f76 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -642,7 +642,10 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): if OPTION['NO_QT_TOOLS']: cmake_cmd.append("-DNO_QT_TOOLS=yes") if OPTION['SKIP_DOCS']: - cmake_cmd.append("-DSKIP_DOCS=yes") + log.info(f"Warning: '--skip-docs' is deprecated and will be removed. " + "The documentation is not built by default") + if OPTION['BUILD_DOCS']: + cmake_cmd.append("-DBUILD_DOCS=yes") log.info(f"Qt Source dir: {cmake_src_dir}") # Use Legacy OpenGL to avoid issues on systems like Ubuntu 20.04 @@ -757,7 +760,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): cmake_cmd.append(f"-DCMAKE_OSX_DEPLOYMENT_TARGET={deployment_target}") os.environ['MACOSX_DEPLOYMENT_TARGET'] = deployment_target - if not OPTION["SKIP_DOCS"]: + if OPTION["BUILD_DOCS"]: # Build the whole documentation (rst + API) by default cmake_cmd.append("-DFULLDOCSBUILD=1") @@ -768,7 +771,11 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): log.info("Output format will be qthelp") cmake_cmd.append("-DDOC_OUTPUT_FORMAT=qthelp") else: - cmake_cmd.append("-DSKIP_DOCS=1") + cmake_cmd.append("-DBUILD_DOCS=no") + if OPTION["DOC_BUILD_ONLINE"]: + log.info("Warning: Documentation build is disabled, " + "however --doc-build-online was passed. " + "Use '--build-docs' to enable the documentation build") if OPTION["PYSIDE_NUMPY_SUPPORT"]: cmake_cmd.append("-DPYSIDE_NUMPY_SUPPORT=1") @@ -819,7 +826,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): if "UTF-8" not in os.environ.get("LC_ALL", ""): os.environ["LC_ALL"] = "en_US.UTF-8" - if not OPTION["SKIP_DOCS"]: + if OPTION["BUILD_DOCS"]: if extension.lower() == SHIBOKEN: found = importlib.util.find_spec("sphinx") if found: @@ -833,8 +840,8 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): else: log.info("Sphinx not found, skipping documentation build") else: - log.info("Skipped documentation generation") - cmake_cmd.append("-DSKIP_DOCS=1") + log.info("-- Skipped documentation generation. Enable with '--build-docs'") + cmake_cmd.append("-DBUILD_DOCS=no") if not OPTION["SKIP_MAKE_INSTALL"]: log.info(f"Installing module {extension}...") |
