Closes #1117: Handle .pyx files in sphinx-apidoc.

This commit is contained in:
Georg Brandl
2013-03-30 11:44:43 +01:00
parent 1d08c910c8
commit 6608b58732
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View File

@@ -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)