From a4d1941a2ff30f92ac465fd1bc06bd1f763c617b Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Tue, 22 Oct 2024 19:46:58 -0400 Subject: [PATCH] Attempt a Python path hack to get ReadTheDocs build working (#1338) --- docs/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 9813f4ad..2883c537 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,6 +18,12 @@ documentation root, use os.path.abspath to make it absolute, like shown here. """ +import sys +from os.path import abspath, dirname + +# Make sure we get the version of this copy of cmd2 +sys.path.insert(1, dirname(dirname(abspath(__file__)))) + # Import for custom theme from Read the Docs import sphinx_rtd_theme