1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#!/usr/bin/env python
"""Patched version of Epydoc that does not blow up with `docutils`
newer than 0.6 when reST is used as a markup language"""
from epydoc.cli import cli
from epydoc.markup.restructuredtext import parse_docstring
from epydoc.docwriter.latex import LatexWriter
# Check whether Epydoc needs patching
doc = parse_docstring("aaa", [])
try:
doc.summary()
except AttributeError:
# Monkey-patching docutils so that Text nodes have a "data" property,
# which is always empty
from docutils.nodes import Text
Text.data=""
LatexWriter.PREAMBLE += [r'\usepackage[T1]{fontenc}']
cli()
|