From: W. Trevor King Date: Mon, 19 Nov 2012 09:35:34 +0000 (-0500) Subject: doc:source:conf.py: add base directory to system path for FFT_tools import X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f2c13eae8580476adf39b527443bbf206b15f500;p=FFT-tools.git doc:source:conf.py: add base directory to system path for FFT_tools import --- 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 -----------------------------------------------------