docs: fix 'make doxygen' under python3

The 'make doxygen' component has this cool vpp specific customization called siphon.
This updates the siphon component so that 'make doxygen' works with python3.

Needed-By:  https://gerrit.fd.io/r/23159

Type: docs

Change-Id: Ie29f1602bf3460b637058acbb0a2f19b128a8824
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:
Paul Vinciguerra
2019-11-01 15:07:32 -04:00
committed by Dave Wallace
parent ea1a65135e
commit 464e5e0bfe
13 changed files with 105 additions and 74 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) 2016 Comcast Cable Communications Management, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,8 @@
# Filter for vpe.api to make it Doxygenish.
import sys, re
import re
import sys
if len(sys.argv) < 2:
sys.stderr.write("Usage: %s <filename>\n" % (sys.argv[0]))
@ -23,15 +24,18 @@ if len(sys.argv) < 2:
patterns = [
# Search for "define" blocks and treat them as structs
( re.compile(r"^.*(manual_.[^\s]+\s+)?define\s+(?P<name>[^\s]+)"), r"typedef struct vl_api_\g<name>_t"),
(re.compile(r"^.*(manual_.[^\s]+\s+)?define\s+(?P<name>[^\s]+)"),
r"typedef struct vl_api_\g<name>_t"),
# For every "brief" statement at the start of a comment block, add an
# xref with whatever is on the same line. This gives us an index page
# with all the API methods in one place.
# XXX Commented out for now; works but duplicates the brief text in the
# struct documentation
#( re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)(\*/)$"), r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), # capture inline comment close
#( re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)$"), r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'),
# (re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)(\*/)$"),
# r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), # capture inline comment close
# (re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)$"),
# r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'),
# Since structs don't have params, replace @param with @tparam
( re.compile("[\\@]param\\b"), "@tparam"),