From ac7aeb705c28283feecdcdf25d60a4a709bfc0a9 Mon Sep 17 00:00:00 2001 From: Albert Mietus Date: Mon, 29 Apr 2024 12:47:06 +0200 Subject: [PATCH] RTD: last try worked, Now: cleanu ( and test) --- .readthedocs.yaml | 7 +++++-- conf.py | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6edea30..d76c5cd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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 diff --git a/conf.py b/conf.py index 60903d3..d73d76f 100644 --- a/conf.py +++ b/conf.py @@ -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'