mirror of https://github.com/kivy/kivy.git
Close Issue #2921 - build doc failure
Fixes issue #2921 as seen in https://groups.google.com/forum/#!topic/kivy-dev/4_DzJUuZAXM. Fixes doc/autobuild.py minor mistake.
This commit is contained in:
parent
dd0e0cfef1
commit
61415b7dcf
|
@ -173,6 +173,10 @@ template_examples_ref = ('# :ref:`Jump directly to Examples'
|
||||||
|
|
||||||
|
|
||||||
def extract_summary_line(doc):
|
def extract_summary_line(doc):
|
||||||
|
"""
|
||||||
|
:param doc: the __doc__ field of a module
|
||||||
|
:return: a doc string suitable for a header or empty string
|
||||||
|
"""
|
||||||
if doc is None:
|
if doc is None:
|
||||||
return ''
|
return ''
|
||||||
for line in doc.split('\n'):
|
for line in doc.split('\n'):
|
||||||
|
@ -187,7 +191,7 @@ def extract_summary_line(doc):
|
||||||
|
|
||||||
for package in packages:
|
for package in packages:
|
||||||
summary = extract_summary_line(sys.modules[package].__doc__)
|
summary = extract_summary_line(sys.modules[package].__doc__)
|
||||||
if summary is None:
|
if summary is None or summary == '':
|
||||||
summary = 'NO DOCUMENTATION (package %s)' % package
|
summary = 'NO DOCUMENTATION (package %s)' % package
|
||||||
t = template.replace('$SUMMARY', summary)
|
t = template.replace('$SUMMARY', summary)
|
||||||
t = t.replace('$PACKAGE', package)
|
t = t.replace('$PACKAGE', package)
|
||||||
|
@ -219,7 +223,7 @@ m.sort()
|
||||||
refid = 0
|
refid = 0
|
||||||
for module in m:
|
for module in m:
|
||||||
summary = extract_summary_line(sys.modules[module].__doc__)
|
summary = extract_summary_line(sys.modules[module].__doc__)
|
||||||
if summary is None:
|
if summary is None or summary == '':
|
||||||
summary = 'NO DOCUMENTATION (module %s)' % package
|
summary = 'NO DOCUMENTATION (module %s)' % package
|
||||||
|
|
||||||
# search examples
|
# search examples
|
||||||
|
|
Loading…
Reference in New Issue