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 <abokovoy@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This commit is contained in:
Alexander Bokovoy
2022-05-03 13:56:41 +03:00
parent 10b4e131a1
commit 4a7cc3467c
2 changed files with 6 additions and 2 deletions

View File

@@ -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
#

View File

@@ -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