path: root/setup.py
diff options
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-04-13 13:55:45 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-04-26 14:34:03 +0000
commit0d12d71920067be499d9237b4ad04f7f11047759 (patch)
tree258ddf9f4b76a46f2abc656b6c725857b606c509 /setup.py
parent0b842db3a95a44fbda3379d2093cb52f8ae2a1ff (diff)
Add references from ApiExtractor to shiboken doc
Including intersphinx extension allow us to link the documentation from ApiExtractor to shiboken's. ApiExtractor doc need to be build first, so we can use the inventory that sphinx create, to link it to shiboken's configuration. All the harcoded references were replaced by dynamic references. Also new labels were included to properly cross reference topics. Checked the spell on many rst files too. Task-number: PYSIDE-363 Change-Id: I11a50b1f9eee48a00a3de6f957942eb0823eba47 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'setup.py')
1 files changed, 11 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index 5b1faf0ff..e2ad9aa14 100644
--- a/setup.py
+++ b/setup.py
@@ -1293,11 +1293,17 @@ class pyside_build(_build):
raise DistutilsSetupError("Error compiling {}".format(extension))
if extension.lower() == "shiboken2":
- log.info("Generating Shiboken documentation {}...".format(
- extension))
- if run_process([self.make_path, "doc"]) != 0:
- raise DistutilsSetupError("Error generating documentation "
- "{}".format(extension))
+ 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 {}".format(extension))
+ except ImportError:
+ log.info("Sphinx not found, skipping documentation build")
log.info("Installing module {}...".format(extension))