While fixing the missing Jinga2 dependency, I noticed this CMake output for Sphinx;

```
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
ERROR: Pipe to stdout was broken
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
```

Switching to using seperate commands fixes this issue.
This commit is contained in:
mavenraven 2023-12-24 20:19:32 -05:00
parent 2bfff79fd3
commit 0d8b941b7f
1 changed files with 3 additions and 5 deletions

View File

@ -15,11 +15,9 @@ if(NOT Sphinx_FOUND)
PATHS ${SPHINX_VENV_DIR}/Scripts ${SPHINX_VENV_DIR}/bin REQUIRED
NO_DEFAULT_PATH NO_CACHE
DOC "Checking Python3 executable in virtual environment")
execute_process(
COMMAND "${VENV_Python3_EXECUTABLE}" -m ensurepip
COMMAND "${VENV_Python3_EXECUTABLE}" -m pip install --upgrade pip
COMMAND "${VENV_Python3_EXECUTABLE}" -m pip install -r
"${SPHINX_DOCUMENT_DIR}/requirements.txt")
execute_process(COMMAND "${VENV_Python3_EXECUTABLE}" -m ensurepip COMMAND_ERROR_IS_FATAL ANY)
execute_process(COMMAND "${VENV_Python3_EXECUTABLE}" -m pip install --upgrade pip COMMAND_ERROR_IS_FATAL ANY)
execute_process(COMMAND "${VENV_Python3_EXECUTABLE}" -m pip install -r "${SPHINX_DOCUMENT_DIR}/requirements.txt" COMMAND_ERROR_IS_FATAL ANY)
set(Sphinx_ROOT "${SPHINX_VENV_DIR}")
unset(Sphinx_FOUND)
find_package(Sphinx REQUIRED)