I am trying to use PlantUML in my Sphinx project hosted on ReadTheDocs. I want to know how to specify the version of PlantUML to install because it’s currently installing an older version, which doesn’t have the latest PlantUML features I want.
I currently have PlantUML diagrams working by adding these to my Sphinx extensions
(in conf.py):
"sphinx.ext.graphviz",
"sphinxcontrib.plantuml",
And I am installing PlantUML as part of my ReadTheDocs configuration (in .readthedocs.yaml):
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
apt_packages:
- plantuml
sphinx:
configuration: wiki/conf.py
fail_on_warning: true
python:
install:
- requirements: wiki/requirements.txt
But when it builds on ReadTheDocs I see it’s installing PlantUML version 1.2020.2, which is quite old:
$ apt-get update --assume-yes --quiet
$ apt-get install --assume-yes --quiet -- plantuml
...
Get:46 http://archive.ubuntu.com/ubuntu jammy/universe amd64 plantuml all 1:1.2020.2+ds-1 [8035 kB]
...
Selecting previously unselected package plantuml.
Preparing to unpack .../45-plantuml_1%3a1.2020.2+ds-1_all.deb ...
Unpacking plantuml (1:1.2020.2+ds-1) ...
...
Setting up plantuml (1:1.2020.2+ds-1) ...
...
done.
2
Answers
The version from Ubuntu 22.04 is the latest version of PlatUML that Read the Docs supports currently. If you need a newer version, you should consider installing it manually by following their installation guide: https://plantuml.com/starting
You can create a
wiki/scripts/pre_install.sh
and then update your
.readthedocs.yaml