mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1117: Handle .pyx files in sphinx-apidoc.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user