From 4a7cc3467c36f304a7b2ab4593b5da4aacaecb73 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 3 May 2022 13:56:41 +0300 Subject: [PATCH] docs: add plantuml and use virtual environment to generate docs Documentation generator can be run inside Python virtual environment. This allows to isolate from the system-wide changes and add Sphinx extensions that aren't packaged in a distribution. The only exception right now is plantuml package. We rely on plantuml to generate diagrams and since it is written in Java, it cannot be installed directly into the Python venv through 'pip' tool. Fixes: https://pagure.io/freeipa/issue/9148 Signed-off-by: Alexander Bokovoy Reviewed-By: Francisco Trivino --- freeipa.spec.in | 4 +++- ipatests/azure/templates/build-docs-fedora.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/freeipa.spec.in b/freeipa.spec.in index c1d816050..be6a5377a 100755 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -323,7 +323,9 @@ BuildRequires: python3-wheel %if %{with doc} BuildRequires: python3-sphinx -BuildRequires: python3-m2r +BuildRequires: plantuml +BuildRequires: fontconfig +BuildRequires: google-noto-sans-vf-fonts %endif # diff --git a/ipatests/azure/templates/build-docs-fedora.yml b/ipatests/azure/templates/build-docs-fedora.yml index d22b7378c..f6b915cdc 100644 --- a/ipatests/azure/templates/build-docs-fedora.yml +++ b/ipatests/azure/templates/build-docs-fedora.yml @@ -1,6 +1,8 @@ steps: - script: | set -e - echo "Building documentation" + echo "Generate virtual environment for building documentation" + make -C doc/ venv + echo "Build documentation" make -C doc/ html displayName: Build documentation