Fix docs builds for modern stevedors

We have a custom doc build extension that scans module names, but
the api for that changed.

Change-Id: If8c08d22dde3e570cdc6fb7092bc131e2e3bcc18
This commit is contained in:
Monty Taylor 2020-07-27 11:12:38 -05:00
parent dab8e1057a
commit a4ac1ea193
1 changed files with 9 additions and 1 deletions

View File

@ -76,7 +76,15 @@ class ListAuthPluginsDirective(rst.Directive):
for name in sorted(mgr.names()):
for line in self.display_plugin(mgr[name]):
for l in line.splitlines():
result.append(l, mgr[name].entry_point.module_name)
ep = mgr[name]
try:
module_name = ep.entry_point.module_name
except AttributeError:
try:
module_name = ep.entry_point.module
except AttributeError:
module_name = ep.entry_point.value
result.append(l, module_name)
# Parse what we have into a new section.
node = nodes.section()