diff options
author | Georg Brandl <georg@python.org> | 2013-03-30 11:44:43 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-03-30 11:44:43 +0100 |
commit | d01ce4177242f0891474a0e834b2bd66c4a5b496 (patch) | |
tree | 6a67b72fccaf3e455116e54c5074e2631c787764 /sphinx/apidoc.py | |
parent | 57f7cee92a14c54a0319637418ca8bbb5fd26199 (diff) | |
download | sphinx-d01ce4177242f0891474a0e834b2bd66c4a5b496.tar.gz |
Closes #1117: Handle .pyx files in sphinx-apidoc.
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r-- | sphinx/apidoc.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |