diff --git a/CHANGES b/CHANGES index 59e44e404..473a99b4d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 0.6.3 (in development) ============================== +* Properly add C module filenames as dependencies in autodoc. + * #253: Ignore graphviz directives without content instead of raising an unhandled exception. diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 155c5711a..ea9a8f17d 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -625,6 +625,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)