diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-04-13 13:55:45 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-04-26 14:34:03 +0000 |
commit | 0d12d71920067be499d9237b4ad04f7f11047759 (patch) | |
tree | 258ddf9f4b76a46f2abc656b6c725857b606c509 /setup.py | |
parent | 0b842db3a95a44fbda3379d2093cb52f8ae2a1ff (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')
-rw-r--r-- | setup.py | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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") + if not OPTION_SKIP_MAKE_INSTALL: log.info("Installing module {}...".format(extension)) |