[Python-modules-commits] [python-attrs] 04/15: Add build directory to sys.path for autodoc.
Tristan Seligmann
mithrandi at moszumanska.debian.org
Fri Jun 30 02:27:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
mithrandi pushed a commit to branch master
in repository python-attrs.
commit 73fe836b0e3e143de16f6a67a3a5fdd3c01bdbdd
Author: Tristan Seligmann <mithrandi at mithrandi.net>
Date: Mon Oct 10 04:42:22 2016 +0200
Add build directory to sys.path for autodoc.
---
docs/conf.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/conf.py b/docs/conf.py
index 52a04e7..15a41b7 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -27,6 +27,11 @@ def find_version(*file_paths):
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
+# If extensions (or modules to document with autodoc) are in another directory,
+# 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.
+import sys
+sys.path.insert(0, os.path.abspath('../.pybuild/pythonX.Y_3.5/build'))
# -- General configuration ------------------------------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-attrs.git
More information about the Python-modules-commits
mailing list