File: epydoc-patched

package info (click to toggle)
python-igraph 0.7.1.post6-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,360 kB
  • sloc: ansic: 20,069; python: 14,114; sh: 56; makefile: 13
file content (20 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download | duplicates (3)
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()