aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'build_scripts/main.py')
-rw-r--r--build_scripts/main.py29
1 files changed, 21 insertions, 8 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 796ea2040..461e5a712 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -805,6 +805,8 @@ class PysideBuild(_build, DistUtilsCommandMixin):
# Add source location for generating documentation
cmake_src_dir = OPTION["QT_SRC"] if OPTION["QT_SRC"] else qt_src_dir
cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir))
+ if OPTION['SKIP_DOCS']:
+ cmake_cmd.append("-DSKIP_DOCS=yes")
log.info("Qt Source dir: {}".format(cmake_src_dir))
if self.build_type.lower() == 'debug':
@@ -905,15 +907,18 @@ class PysideBuild(_build, DistUtilsCommandMixin):
cmake_cmd.append("-DCMAKE_C_COMPILER=cl.exe")
cmake_cmd.append("-DCMAKE_CXX_COMPILER=cl.exe")
- if OPTION["DOC_BUILD_ONLINE"]:
- log.info("Output format will be HTML")
- cmake_cmd.append("-DDOC_OUTPUT_FORMAT=html")
- else:
- log.info("Output format will be qthelp")
- cmake_cmd.append("-DDOC_OUTPUT_FORMAT=qthelp")
+ if not OPTION["SKIP_DOCS"]:
+ # Build the whole documentation (rst + API) by default
+ cmake_cmd.append("-DFULLDOCSBUILD=1")
- # Build the whole documentation (rst + API) by default
- cmake_cmd.append("-DFULLDOCSBUILD=1")
+ if OPTION["DOC_BUILD_ONLINE"]:
+ log.info("Output format will be HTML")
+ cmake_cmd.append("-DDOC_OUTPUT_FORMAT=html")
+ else:
+ log.info("Output format will be qthelp")
+ cmake_cmd.append("-DDOC_OUTPUT_FORMAT=qthelp")
+ else:
+ cmake_cmd.append("-DSKIP_DOCS=1")
if not OPTION["SKIP_CMAKE"]:
log.info("Configuring module {} ({})...".format(extension, module_src_dir))
@@ -930,6 +935,13 @@ class PysideBuild(_build, DistUtilsCommandMixin):
if run_process(cmd_make) != 0:
raise DistutilsSetupError("Error compiling {}".format(extension))
+ if sys.version_info == (3, 6) and sys.platform == "darwin":
+ # Python 3.6 has a Sphinx problem because of docutils 0.17 .
+ # Instead of pinning v0.16, setting the default encoding fixes that.
+ # Since other platforms are not affected, we restrict this to macOS.
+ if "UTF-8" not in os.environ.get("LC_ALL", ""):
+ os.environ["LC_ALL"] = "en_US.UTF-8"
+
if not OPTION["SKIP_DOCS"]:
if extension.lower() == "shiboken2":
try:
@@ -944,6 +956,7 @@ class PysideBuild(_build, DistUtilsCommandMixin):
log.info("Sphinx not found, skipping documentation build")
else:
log.info("Skipped documentation generation")
+ cmake_cmd.append("-DSKIP_DOCS=1")
if not OPTION["SKIP_MAKE_INSTALL"]:
log.info("Installing module {}...".format(extension))