aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.py
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-05-07 14:38:36 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-05-07 12:53:13 +0000
commit0efa2133113f0d012666d300e7aedd1c5e607a94 (patch)
tree2bf7e65af6d80e28ec4128009bb964b154ff2762 /build_scripts/main.py
parentd5f650771cda6587f140dd15b6768188fb3ea347 (diff)
Add option to skip docs generation
Adding option to avoid building the documentation. Change-Id: Ia5595e6686c6e7d31e94818c1efb28238a3fbfc7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'build_scripts/main.py')
-rw-r--r--build_scripts/main.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 23eb5500..3fe59e06 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -1079,17 +1079,21 @@ class pyside_build(_build):
if run_process(cmd_make) != 0:
raise DistutilsSetupError("Error compiling {}".format(extension))
- if extension.lower() == "shiboken2":
- try:
- # Check if sphinx is installed to proceed.
- import sphinx
-
- log.info("Generating Shiboken documentation")
- if run_process([self.make_path, "doc"]) != 0:
- raise DistutilsSetupError(
- "Error generating documentation for {}".format(extension))
- except ImportError:
- log.info("Sphinx not found, skipping documentation build")
+ if not OPTION_SKIP_DOCS:
+ if extension.lower() == "shiboken2":
+ try:
+ # Check if sphinx is installed to proceed.
+ import sphinx
+
+ log.info("Generating Shiboken documentation")
+ if run_process([self.make_path, "doc"]) != 0:
+ raise DistutilsSetupError(
+ "Error generating documentation for {}".format(
+ extension))
+ except ImportError:
+ log.info("Sphinx not found, skipping documentation build")
+ else:
+ log.info("Skipped documentation generation")
if not OPTION_SKIP_MAKE_INSTALL: