From 0d12d71920067be499d9237b4ad04f7f11047759 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Fri, 13 Apr 2018 13:55:45 +0200 Subject: 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 --- setup.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'setup.py') 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") + if not OPTION_SKIP_MAKE_INSTALL: log.info("Installing module {}...".format(extension)) -- cgit v1.2.3