[Python-modules-commits] [python-attrs] 03/13: Add build directory to sys.path for autodoc.

Tristan Seligmann mithrandi at moszumanska.debian.org
Tue Jan 23 13:09:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to tag debian/17.4.0-1
in repository python-attrs.

commit 9b5496d3589b7139df14ce5aefba55944979985e
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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index a914008..3d29d96 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -27,6 +27,13 @@ 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
+ver = sys.version_info[0:2]
+sys.path.insert(
+    0, os.path.abspath('../.pybuild/pythonX.Y_{0}.{1}/build'.format(*ver)))
 
 # -- 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