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 committed 2022-05-04 15:50:39 +03:00
1 parent de918aea19
commit 7ddef72fbb
2 files changed
+6 -2

No files matched your search

+3 -1
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
#
@@ -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