Skip to content
Snippets Groups Projects
Commit fe2c03d8 authored by Marc-Olivier Andrez's avatar Marc-Olivier Andrez
Browse files

ci: use Python interpreter found by CMake when building sphinx doc

Rationale: using possibly different Python interpreters for the
different task can make the installation of packages required by the
different interpreters more complicated.
parent 454d450d
No related branches found
No related tags found
No related merge requests found
file(COPY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
find_package(Python3 REQUIRED COMPONENTS Interpreter)
add_custom_target(
docs-py ALL
COMMAND
make html VERBATIM
make html PYTHON_INTERPRETER=${Python3_EXECUTABLE} VERBATIM
WORKING_DIRECTORY sphinx
)
......
......@@ -2,8 +2,9 @@
#
# You can set these variables from the command line.
PYTHON_INTERPRETER = python3
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SPHINXBUILD = ${PYTHON_INTERPRETER} -m sphinx
SPHINXPROJ = ASAPO
SOURCEDIR = source
BUILDDIR = build
......@@ -17,4 +18,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment