Skip to content

Commit fcdcfd5

Browse files
committed
GitHub Actions.
1 parent d0f1e7e commit fcdcfd5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@ find_package(Python3 COMPONENTS Interpreter REQUIRED)
33
set(DOC_VENV_PATH "${CMAKE_CURRENT_BINARY_DIR}/.venv")
44
if (NOT IS_DIRECTORY "${DOC_VENV_PATH}")
55
message(STATUS "Creating Python venv for documentation in ${DOC_VENV_PATH}...")
6-
execute_process(COMMAND "${Python3_EXECUTABLE}" -m venv "${DOC_VENV_PATH}")
6+
execute_process(
7+
COMMAND "${Python3_EXECUTABLE}" -m venv "${DOC_VENV_PATH}"
8+
COMMAND_ERROR_IS_FATAL ANY
9+
)
710
endif ()
811

912
# See https://discourse.cmake.org/t/possible-to-create-a-python-virtual-env-from-cmake-and-then-find-it-with-findpython3/1132
1013
set(ENV{VIRTUAL_ENV} "${DOC_VENV_PATH}")
1114
set(Python3_FIND_VIRTUALENV ONLY)
1215
unset(Python3_EXECUTABLE)
16+
unset(ENV{Python_ROOT_DIR})
17+
unset(ENV{Python3_ROOT_DIR})
1318
find_package(Python3 COMPONENTS Interpreter REQUIRED)
14-
execute_process(COMMAND "${Python3_EXECUTABLE}" -m pip install -U -r "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt")
19+
execute_process(
20+
COMMAND "${Python3_EXECUTABLE}" -m pip install -U -r "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt"
21+
COMMAND_ERROR_IS_FATAL ANY
22+
)
1523

1624
# Create build info to send to Sphinx
1725
set(SPHINX_BUILD_INFO "{ }")

0 commit comments

Comments
 (0)