修訂 | 88e0fcfa9ae2cc15fd8c3db471bb7618b458ee1a (tree) |
---|---|
時間 | 2024-04-29 18:54:59 |
作者 | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
RTD: TRY to use a modern plantUML ...(started)
@@ -10,7 +10,13 @@ | ||
10 | 10 | tools: |
11 | 11 | python: "3.11" |
12 | 12 | apt_packages: |
13 | - - python3-sphinxcontrib.plantuml | |
13 | + # python3-sphinxcontrib.plantuml install an old one version. | |
14 | + # Better to replace it by pip, so the requerments-file, which is already done | |
15 | + # - python3-sphinxcontrib.plantuml | |
16 | + jobs: | |
17 | + post_install: | |
18 | + - mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/libexec | |
19 | + - curl -o ${READTHEDOCS_VIRTUALENV_PATH}/libexec/plantuml.jar -L https://github.com/plantuml/plantuml/releases/download/v1.2024.4/plantuml-1.2024.4.jar | |
14 | 20 | |
15 | 21 | # Build documentation in the docs/ directory with Sphinx |
16 | 22 | sphinx: |
@@ -72,13 +72,22 @@ | ||
72 | 72 | |
73 | 73 | # plantUML |
74 | 74 | #--------- |
75 | + | |
75 | 76 | extensions.append('sphinxcontrib.plantuml') |
76 | 77 | if on_rtd: |
77 | - plantuml = 'java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar' | |
78 | + if False: #old | |
79 | + plantuml = 'java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar' | |
80 | + else: | |
81 | + # in `.readthedocs.yaml` | |
82 | + # post_install: | |
83 | + # - curl -o ${READTHEDOCS_VIRTUALENV_PATH}/libexec/plantuml.jar -L https://github.com/plantuml/.... | |
84 | + import os | |
85 | + _path=os.environ['READTHEDOCS_VIRTUALENV_PATH'] + '/libexec/' | |
86 | + plantuml = f'java -Djava.awt.headless=true -jar {_path}plantuml.jar' | |
78 | 87 | else: |
79 | 88 | # plantuml = 'java -Djava.awt.headless=true -jar /Users/albert/Apps/PlantUML/libexec/plantuml-RTfD.jar' #plantuml.1.2020.2.jar |
80 | - plantuml = 'plantuml' | |
81 | - | |
89 | +# plantuml = 'plantuml' | |
90 | + plantuml = 'java -Djava.awt.headless=true -jar /Users/albert/Apps/PlantUML/libexec/plantuml-1.2024.4.jar' # NEW | |
82 | 91 | |
83 | 92 | ##plantuml_output_format='svg_img' |
84 | 93 | ## dito only can be png? |