diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | sphinx/apidoc.py | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -158,6 +158,7 @@ Bugs fixed * Fix text writer not handling visit_legend for figure directive contents. * Fix text builder not respecting wide/fullwidth characters: title underline width, table layout width and text wrap width. +* #1117: Handle .pyx files in sphinx-apidoc. * #1111: Fix failure to find uppercase words in search when :confval:`html_search_language` is 'ja'. Thanks to Tomo Saito. * #1108: The text writer now correctly numbers enumerated lists with diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index 15160828..500332c3 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -31,6 +31,7 @@ else: ] INITPY = '__init__.py' +PY_SUFFIXES = set(['.py', '.pyx']) def makename(package, module): @@ -163,7 +164,8 @@ def recurse_tree(rootpath, excludes, opts): del subs[:] continue # document only Python module files - py_files = sorted([f for f in files if path.splitext(f)[1] == '.py']) + py_files = sorted(f for f in files + if path.splitext(f)[1] in PY_SUFFIXES) is_pkg = INITPY in py_files if is_pkg: py_files.remove(INITPY) |