oslo.vmware conf.py for building sphinx is wrong and fails build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.vmware |
Fix Released
|
High
|
Unassigned |
Bug Description
In doc/source/conf.py, we have the below code:
exclude_patterns = [
'api/tests.*', # avoid of docs generation from tests
'api/
'api/
]
# Prune the excluded patterns from the autoindex
for line in fileinput.
found = False
for pattern in exclude_patterns:
if fnmatch.
found = True
if not found:
print line,
If I call sphinx-build to build the doc like this (which is standard in my OpenStack Debian packages):
PYTHONPATH=. sphinx-build -b html doc/source debian/
I get:
Exception occurred:
File "/usr/lib/
os.
OSError: [Errno 2] No such file or directory
The full traceback has been saved in /tmp/sphinx-
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https:/
The .log file contains the below traceback:
Traceback (most recent call last):
File "/usr/lib/
warningiserror, tags, verbosity, parallel)
File "/usr/lib/
confoverrides or {}, self.tags)
File "/usr/lib/
execfile_
File "/usr/lib/
exec code in _globals
File "conf.py", line 43, in <module>
File "/usr/lib/
line = self.readline()
File "/usr/lib/
os.
OSError: [Errno 2] No such file or directory
Commenting out the block starting with "for line in fileinput.input" repairs the sphinx-build call, which is how I patched oslo.vmware in Debian. Please fix the conf.py so that it may work unmodified.
Changed in oslo.vmware: | |
milestone: | none → next-kilo |
status: | New → Triaged |
importance: | Undecided → High |
Changed in oslo.vmware: | |
milestone: | 0.7.0 → kilo-next |
Changed in oslo.vmware: | |
status: | Confirmed → Fix Committed |
Changed in oslo.vmware: | |
status: | Fix Committed → Fix Released |
Removing those lines means we end up documenting classes and modules that we don't want published because they are internal details, so we need some other solution.