# HG changeset patch # User Goffi # Date 1638290316 -3600 # Node ID a24d362796beb6f96ca3264962bc25765c6f6690 # Parent 608cec27bfea39011ab81f7b424f02e64ef9aec0 use python module to run sphinx: this way we are sure to run the right version with right Python environment. diff -r 608cec27bfea -r a24d362796be tasks/task_generate_doc.py --- a/tasks/task_generate_doc.py Wed Jun 16 18:17:17 2021 +0000 +++ b/tasks/task_generate_doc.py Tue Nov 30 17:38:36 2021 +0100 @@ -1,5 +1,6 @@ #!/ur/bin/env python3 +import sys import os.path from sat.core.i18n import _ from sat.core.log import getLogger @@ -41,17 +42,19 @@ site_name = self.site_name)) return - sphinx = self.findCommand('sphinx-build') - # we first generate the sub documentations for name, sub_doc_path in list(self.sub_docs.items()): sub_dir = regex.pathEscape(name or '') build_path = os.path.join(self.build_path, 'doc', sub_dir) - await self.runCommand(sphinx, sub_doc_path, build_path) + await self.runCommand( + sys.executable, "-m", "sphinx", sub_doc_path, build_path, + ) # then the root one if self.doc_path is not None: build_path = os.path.join(self.build_path, 'doc') - await self.runCommand(sphinx, self.doc_path, build_path) + await self.runCommand( + sys.executable, "-m", "sphinx", self.doc_path, build_path, + ) log.info(_("documentation has been generated"))