[Python-checkins] r61694 - doctools/trunk/doc/config.rst
georg.brandl
python-checkins at python.org
Fri Mar 21 15:26:22 CET 2008
Author: georg.brandl
Date: Fri Mar 21 15:26:21 2008
New Revision: 61694
Modified:
doctools/trunk/doc/config.rst
Log:
Add a note about sys.path in conf.py.
Modified: doctools/trunk/doc/config.rst
==============================================================================
--- doctools/trunk/doc/config.rst (original)
+++ doctools/trunk/doc/config.rst Fri Mar 21 15:26:21 2008
@@ -37,7 +37,18 @@
extensions coming with Sphinx (named ``sphinx.addons.*``) or custom ones.
Note that you can extend :data:`sys.path` within the conf file if your
- extensions live in another directory.
+ extensions live in another directory -- but make sure you use absolute
+ paths. If your extension path is relative to the documentation root, use
+ :func:`os.path.abspath` like so::
+
+ import sys, os
+
+ sys.path.append(os.path.abspath('sphinxext'))
+
+ extensions = ['extname']
+
+ That way, you can load an extension called ``extname`` from the documentation
+ root's subdirectory ``sphinxext``.
.. confval:: templates_path
More information about the Python-checkins
mailing list