From f2c13eae8580476adf39b527443bbf206b15f500 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 19 Nov 2012 04:35:34 -0500 Subject: [PATCH] doc:source:conf.py: add base directory to system path for FFT_tools import --- README | 2 +- doc/source/conf.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README b/README index dcf9932..eddd589 100644 --- a/README +++ b/README @@ -53,7 +53,7 @@ and the numpydoc_ extension. I haven't been able to get numpydoc working cleanly, but you can still build a decent version of the docs from the ``doc`` subdirectory with:: - $ PYTHONPATH=.. make SPHINXBUILD=sphinx-build-2.7 dirhtml + $ make SPHINXBUILD=sphinx-build-2.7 dirhtml Usage ===== diff --git a/doc/source/conf.py b/doc/source/conf.py index 5237fcc..81f8dd9 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -19,6 +19,10 @@ import sys # 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('.')) +_this_dir = os.path.dirname(os.path.abspath(__file__)) +_doc_dir = os.path.dirname(_this_dir) +_base_dir = os.path.dirname(_doc_dir) +sys.path.insert(0, _base_dir) # -- General configuration ----------------------------------------------------- -- 2.26.2