merge with stable

This commit is contained in:
Georg Brandl 2014-01-19 11:16:38 +01:00
commit 04746ffea9
3 changed files with 8 additions and 2 deletions

View File

@ -137,7 +137,7 @@ Bugs fixed
* #848: Always take the newest code in incremental rebuilds with the
:mod:`sphinx.ext.viewcode` extension.
* #979: Fix exclude handling in ``sphinx-apidoc``.
* #979, #1266: Fix exclude handling in ``sphinx-apidoc``.
Documentation
-------------

View File

@ -182,6 +182,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):
# document only Python module files (that aren't excluded)
py_files = sorted(f for f in files
@ -197,7 +198,11 @@ def recurse_tree(rootpath, excludes, opts):
continue
# remove hidden ('.') and private ('_') directories, as well as
# excluded dirs
subs[:] = sorted(sub for sub in subs if sub[0] not in ['.', '_']
if includeprivate:
exclude_prefixes = ('.',)
else:
exclude_prefixes = ('.', '_')
subs[:] = sorted(sub for sub in subs if not sub.startswith(exclude_prefixes)
and not is_excluded(path.join(root, sub), excludes))
if is_pkg:

View File

@ -537,6 +537,7 @@ class DefinitionParser(object):
'mutable': None,
'const': None,
'typename': None,
'struct': None,
'unsigned': set(('char', 'short', 'int', 'long')),
'signed': set(('char', 'short', 'int', 'long')),
'short': set(('int',)),