-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for sphinx build #1063
Fixes for sphinx build #1063
Conversation
ericwb
commented
Sep 22, 2023
•
edited
Loading
edited
- The build_sphinx command has long since replaced with sphinx-build.
- The root of the docs is now defined by root_doc instead of master_doc
- Guard against the importlib.metadata.PackageNotFoundError exception occurring during the Sphinx build.
- Update the copyright to current year
- Use a platform agnostic sys.path loading in Sphinx conf
The build_sphinx command has long since replaced with sphinx-build.
Verified it is now building: https://readthedocs.org/projects/bandit/builds/22008003/ |
Nevermind, it's building, but the output looks very broken. |
Docs now build and look proper: https://bandit.readthedocs.io/en/ericwb-patch-2/ |
FYI, the cryptic error from the Sphinx build looks like the following:
https://readthedocs.org/projects/bandit/builds/22797524/ Sphinx is swallowing the full exception, but it's raising a importlib.metadata.PackageNotFoundError |
We can install bandit as a requirement for building the docs. This is fairly common. It will resolve the version issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's install bandit from source locally to avoid the importlib problem
bandit/__init__.py
Outdated
@@ -16,4 +16,8 @@ | |||
from bandit.core.issue import * # noqa | |||
from bandit.core.test_properties import * # noqa | |||
|
|||
__version__ = metadata.version("bandit") | |||
try: | |||
__version__ = metadata.version("bandit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please no
Thanks for the tip. That does work better! |
Latest build and output: |