summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 2b280d673..bf7fb90ce 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -631,6 +631,9 @@ class Documenter(object):
except PycodeError, err:
# no source file -- e.g. for builtin and C modules
self.analyzer = None
+ # at least add the module.__file__ as a dependency
+ if hasattr(self.module, '__file__') and self.module.__file__:
+ self.directive.filename_set.add(self.module.__file__)
else:
self.directive.filename_set.add(self.analyzer.srcname)