diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 57f6836c..ebc75f1f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -18,6 +18,12 @@ build: - ghostscript - graphviz - texlive-full + jobs: + post_install: + - pushd docs + - doxygen ./doxygen/Doxyfile.in + - popd + - ls ./_readthedocs # Build documentation in the "docs/" directory with Sphinx sphinx: diff --git a/docs/conf.py b/docs/conf.py index f677d8ba..b5da42af 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,21 +16,20 @@ import os import shlex -read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' -if read_the_docs_build: - - # Modify Doxyfile for ReadTheDocs compatibility - with open('./doxygen/Doxyfile.in', 'r') as f: - fdata = f.read() - fdata = fdata.replace('@PROJECT_SOURCE_DIR@', '.') - with open('./doxygen/Doxyfile.in', 'w') as f: - f.write(fdata) - with open('./doxygen/Doxyfile.in', 'a') as f: - f.write("\nOUTPUT_DIRECTORY= sphinx/_build/doxygen") + + +# Modify Doxyfile for ReadTheDocs compatibility +with open('./doxygen/Doxyfile.in', 'r') as f: + fdata = f.read() +fdata = fdata.replace('@PROJECT_SOURCE_DIR@', '.') +with open('./doxygen/Doxyfile.in', 'w') as f: + f.write(fdata) +with open('./doxygen/Doxyfile.in', 'a') as f: + f.write("\nOUTPUT_DIRECTORY=../_readthedocs/html/doxygen") # Call doxygen - from subprocess import call - call(['doxygen', "./doxygen/Doxyfile.in"]) + # from subprocess import call + # call(['doxygen', "./doxygen/Doxyfile.in"]) # Get current directory