54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
import subprocess, os
|
|
|
|
|
|
def configureDoxyfile(input_dir, output_dir):
|
|
with open('Doxyfile.in', 'r') as file:
|
|
filedata = file.read()
|
|
|
|
filedata = filedata.replace('@DOXYGEN_INPUT_DIR@', input_dir)
|
|
filedata = filedata.replace('@DOXYGEN_OUTPUT_DIR@', output_dir)
|
|
|
|
with open('Doxyfile', 'w') as file:
|
|
file.write(filedata)
|
|
|
|
|
|
# Check if we're running on Read the Docs' servers
|
|
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
|
|
|
|
breathe_projects = {}
|
|
|
|
if read_the_docs_build:
|
|
input_dir = '../quill'
|
|
output_dir = 'build'
|
|
configureDoxyfile(input_dir, output_dir)
|
|
subprocess.call('doxygen', shell=True)
|
|
breathe_projects['Quill'] = output_dir + '/xml'
|
|
|
|
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
project = 'Quill'
|
|
copyright = '2024, Odysseas Georgoudis'
|
|
author = 'Odysseas Georgoudis'
|
|
release = 'v4.0.0'
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
extensions = ["breathe", "sphinx.ext.autosectionlabel"]
|
|
breathe_default_project = "Quill"
|
|
|
|
templates_path = ['_templates']
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
html_static_path = ['_static']
|