2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 22:45:18 +00:00

[#1945] generate kea-messages.rst a priori

This allows us to document premium messages in the public ARM without
having to hand out a copy of the premium sources to readthedocs.
This commit is contained in:
Andrei Pavel
2024-08-19 18:34:39 +03:00
parent 79b57e5f8d
commit a56fb8d6c6
4 changed files with 25704 additions and 9 deletions

View File

@@ -22,7 +22,6 @@ SRC_DIR = os.path.abspath(os.path.dirname(__file__))
sys.path.append(SRC_DIR)
import api2doc # noqa # pylint: disable=wrong-import-position
import mes2doc # noqa # pylint: disable=wrong-import-position
# -- Project information -----------------------------------------------------
@@ -260,11 +259,6 @@ def run_generate_docs(_):
api_files = [os.path.abspath(os.path.join(SRC_DIR, '../..', af)) for af in api_files]
api2doc.generate(api_files, os.path.join(SRC_DIR, 'api.rst'))
with open(os.path.join(SRC_DIR, 'mes-files.txt'), encoding='utf-8') as mf:
mes_files = mf.read().split()
mes_files = [os.path.abspath(os.path.join(SRC_DIR, '../..', mf)) for mf in mes_files]
mes2doc.generate(mes_files, os.path.join(SRC_DIR, 'kea-messages.rst'))
# Sphinx has some limitations. It can't import files from outside its directory, which
# in our case is src/sphinx. On the other hand, we need to have platforms.rst file
# in top level directory, so it's easily accessible by prospective and first time