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

Merge branch 'use-python-interpreter-found-by-cmake-when-building-sphinx-doc' into 'develop'

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

See merge request asapo/asapo!220
parents 454d450d fe2c03d8
No related branches found
Tags 23.11.1
No related merge requests found
file(COPY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
find_package(Python3 REQUIRED COMPONENTS Interpreter)
add_custom_target( add_custom_target(
docs-py ALL docs-py ALL
COMMAND COMMAND
make html VERBATIM make html PYTHON_INTERPRETER=${Python3_EXECUTABLE} VERBATIM
WORKING_DIRECTORY sphinx WORKING_DIRECTORY sphinx
) )
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
# #
# You can set these variables from the command line. # You can set these variables from the command line.
PYTHON_INTERPRETER = python3
SPHINXOPTS = SPHINXOPTS =
SPHINXBUILD = python3 -msphinx SPHINXBUILD = ${PYTHON_INTERPRETER} -m sphinx
SPHINXPROJ = ASAPO SPHINXPROJ = ASAPO
SOURCEDIR = source SOURCEDIR = source
BUILDDIR = build BUILDDIR = build
...@@ -17,4 +18,4 @@ help: ...@@ -17,4 +18,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile %: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
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