Skip to content

Commit

Permalink
RTD: last try worked, Now: cleanu ( and test)
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Mietus authored and Albert Mietus committed Apr 29, 2024
1 parent f64877d commit ac7aeb7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ build:
# python: "3.11"
python: "3.9"
apt_packages:
# python3-sphinxcontrib.plantuml install an old one version.
# Better to replace it by pip, so the requerments-file, which is already done
# python3-sphinxcontrib.plantuml installs an old version of plantuml ...
# But is needed, to install dependencies ..
# Below, an other plantUML jar is installed
# (Both are needed ... it also in the requerments-file, but needed here)
- python3-sphinxcontrib.plantuml
jobs:
post_install:
# Install a newer version op plantuml -- keep in sync witch 'conf.py'!
- mkdir -p ${READTHEDOCS_VIRTUALENV_PATH}/libexec
- curl -o ${READTHEDOCS_VIRTUALENV_PATH}/libexec/plantuml.jar -L https://github.com/plantuml/plantuml/releases/download/v1.2024.4/plantuml-1.2024.4.jar

Expand Down
24 changes: 10 additions & 14 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,19 @@ def setup(app):
#---------

extensions.append('sphinxcontrib.plantuml')
if True or on_rtd:
print('DEBUG: on_rtd')
if False: #old
plantuml = 'java -Djava.awt.headless=true -jar /usr/share/plantuml/plantuml.jar'
else:
# in `.readthedocs.yaml`
# post_install:
# - curl -o ${READTHEDOCS_VIRTUALENV_PATH}/libexec/plantuml.jar -L https://github.com/plantuml/....
import os
_path=os.environ['READTHEDOCS_VIRTUALENV_PATH'] + '/libexec/'
plantuml = f'java -Djava.awt.headless=true -jar {_path}plantuml.jar'
print(f'DEBUG: plantuml={plantuml}')
if on_rtd:
# in `.readthedocs.yaml`
# post_install:
# - curl -o ${READTHEDOCS_VIRTUALENV_PATH}/libexec/plantuml.jar -L https://github.com/plantuml/....
# Make use of that plantUML version
import os
_path=os.environ['READTHEDOCS_VIRTUALENV_PATH'] + '/libexec/'
plantuml = f'java -Djava.awt.headless=true -jar {_path}plantuml.jar'
#print(f'DEBUG: plantuml={plantuml}')
else: #local
# plantuml = 'java -Djava.awt.headless=true -jar /Users/albert/Apps/PlantUML/libexec/plantuml-RTfD.jar' #plantuml.1.2020.2.jar
# plantuml = 'plantuml'
plantuml = 'java -Djava.awt.headless=true -jar /Users/albert/Apps/PlantUML/libexec/plantuml-1.2024.4.jar' # NEW


##plantuml_output_format='svg_img'
## dito only can be png?
plantuml_output_format='png'
Expand Down

0 comments on commit ac7aeb7

Please sign in to comment.