Skip to content

Commit

Permalink
Try vendoring plantuml jar for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Oct 31, 2023
1 parent 4915b49 commit 4ac7b8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -16,6 +14,10 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import os

conf_dir = os.path.abspath(os.path.dirname(__file__))


# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -59,6 +61,10 @@

# -- Options for PlantUML for Sphinx ----------------------------------------

plantuml_jar = os.getenv("PLANTUML_JAR")
if plantuml_jar:
plantuml = f"java -jar {plantuml_jar}"
is_rtd = os.getenv("READTHEDOCS") == "True"
if is_rtd:
plantuml = f"java -jar {conf_dir}/vendor/plantuml-gplv2-1.2023.12.jar"
else:
plantuml_jar = os.getenv("PLANTUML_JAR")
if plantuml_jar:
plantuml = f"java -jar {plantuml_jar}"
Binary file added vendor/plantuml-gplv2-1.2023.12.jar
Binary file not shown.

0 comments on commit 4ac7b8e

Please sign in to comment.