Skip to content
Snippets Groups Projects
Commit a027cebf authored by Antoine Lambert's avatar Antoine Lambert
Browse files

sphinx/conf.py: Filter out swh-webhooks doc in set_django_settings

swh-webhooks package is detected as swh-web by the code of that function
but django is not installed when building standalone doc for this package.
parent 8dae40f2
No related branches found
No related tags found
No related merge requests found
......@@ -286,9 +286,14 @@ class SimpleDocumenter(autodoc.FunctionDocumenter):
# sphinx event handler to set adequate django settings prior reading
# apidoc generated rst files when building doc to avoid autodoc errors
def set_django_settings(app, env, docname):
if any([pattern in app.srcdir for pattern in ("swh-web-client", "DWCLI")]):
# swh-web-client is detected as swh-web by the code below but
# django is not installed when building standalone swh-web-client doc
if any(
[
pattern in app.srcdir
for pattern in ("swh-web-client", "DWCLI", "swh-webhooks")
]
):
# swh-web-client and swh-webhooks are detected as swh-web by the code below
# but django is not installed when building standalone doc for these packages
return
package_settings = {
"auth": "swh.auth.tests.django.app.apptest.settings",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment