doc: Use sys.path.append for pytests being found

Rather than having our "docs" build tagets modify PTYHONPATH, have
doc/conf.py append the required paths at runtime instead. This will
ensure that our builds from readthedocs will also find all of the
required files.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2026-03-09 12:09:52 -06:00
committed by Heinrich Schuchardt
parent 2632deee5f
commit d0dfaacf57
2 changed files with 3 additions and 2 deletions

View File

@@ -34,6 +34,8 @@ if os.environ.get("READTHEDOCS", "") == "True":
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('sphinx'))
sys.path.append(os.path.abspath('../test/py/tests'))
sys.path.append(os.path.abspath('../test/py'))
from load_config import loadConfig
# -- General configuration ------------------------------------------------