mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1383: Fix Python 2.5 compatibility of sphinx-apidoc.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -14,6 +14,7 @@ Bugs fixed
|
||||
the "wildcard" style reference.
|
||||
* #1374: Fix for autosummary generating overly-long summaries if first line
|
||||
doesn't end with a period.
|
||||
* #1383: Fix Python 2.5 compatibility of sphinx-apidoc.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
@@ -19,6 +19,8 @@ import sys
|
||||
import optparse
|
||||
from os import path
|
||||
|
||||
from sphinx.util.osutil import walk
|
||||
|
||||
# automodule options
|
||||
if 'SPHINX_APIDOC_OPTIONS' in os.environ:
|
||||
OPTIONS = os.environ['SPHINX_APIDOC_OPTIONS'].split(',')
|
||||
@@ -183,7 +185,7 @@ def recurse_tree(rootpath, excludes, opts):
|
||||
toplevels = []
|
||||
followlinks = getattr(opts, 'followlinks', False)
|
||||
includeprivate = getattr(opts, 'includeprivate', False)
|
||||
for root, subs, files in os.walk(rootpath, followlinks=followlinks):
|
||||
for root, subs, files in walk(rootpath, followlinks=followlinks):
|
||||
# document only Python module files (that aren't excluded)
|
||||
py_files = sorted(f for f in files
|
||||
if path.splitext(f)[1] in PY_SUFFIXES and
|
||||
|
||||
Reference in New Issue
Block a user