scons
scons copied to clipboard
Sphinx 5.0.2 is failing with SCons 4.4.0
Hi all.
Describe the bug
Running Sphinx v5.0.2
WARNING: html_static_path entry '_static' does not exist
[autosummary] generating autosummary for: SCons.Node.rst, SCons.Platform.rst, SCons.Scanner.rst, SCons.Script.rst, SCons.Tool.rst, SCons.Variables.rst, SCons.compat.rst, SCons.rst, index.rst
building [mo]: targets for 0 po files that are out of date
building [pdf]: targets for 9 source files that are out of date
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [ 11%] SCons
reading sources... [ 22%] SCons.Node
reading sources... [ 33%] SCons.Platform
reading sources... [ 44%] SCons.Scanner
reading sources... [ 55%] SCons.Script
reading sources... [ 66%] SCons.Tool
reading sources... [ 77%] SCons.Variables
reading sources... [ 88%] SCons.compat
reading sources... [100%] index
WARNING: autodoc: failed to determine SCons.Executor::NullEnvironment._instance (Null(0x3FFB9CD4BD0)) to be documented, the following exception was raised:
Handler <function _skip_member at 0x3ffba929ee0> for event 'autodoc-skip-member' threw an exception (exception: cannot unpack non-iterable Null object)
WARNING: autodoc: failed to determine SCons.Util::Null._instance (Null(0x3FFB9CD4BD0)) to be documented, the following exception was raised:
Handler <function _skip_member at 0x3ffba929ee0> for event 'autodoc-skip-member' threw an exception (exception: cannot unpack non-iterable Null object)
WARNING: autodoc: failed to determine SCons.Util::NullSeq._instance (Null(0x3FFB9CD4BD0)) to be documented, the following exception was raised:
Handler <function _skip_member at 0x3ffba929ee0> for event 'autodoc-skip-member' threw an exception (exception: cannot unpack non-iterable Null object)
/builddir/build/BUILD/scons-4.4.0/SCons/dblite.py:docstring of posix.chown:16: ERROR: Unexpected indentation.
/builddir/build/BUILD/scons-4.4.0/SCons/dblite.py:docstring of posix.chown:17: WARNING: Block quote ends without a blank line; unexpected unindent.
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
/builddir/build/BUILD/scons-4.4.0/SCons/Node/__init__.py:docstring of SCons.Node.Node.Attrs:1: WARNING: duplicate object description of SCons.Node.Node.Attrs, other instance in SCons.Node, use :noindex: for one of them
WARNING: autodoc: failed to determine SCons.Script.Main::BuildTask.progress (Null(0x3FFB9CD4BD0)) to be documented, the following exception was raised:
Handler <function _skip_member at 0x3ffba929ee0> for event 'autodoc-skip-member' threw an exception (exception: cannot unpack non-iterable Null object)
/builddir/build/BUILD/scons-4.4.0/SCons/Script/SConsOptions.py:docstring of optparse.OptionParser.parse_args:3: WARNING: Definition list ends without a blank line; unexpected unindent.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing scons-api...
index
SCons
SCons.Node
SCons.Platform
SCons.Scanner
SCons.Script
SCons.Tool
SCons.Variables
SCons.compat
SCons.compat
SCons.Node
SCons.Platform
SCons.Scanner
SCons.Script
SCons.Tool
SCons.Variables
[ERROR] pdfbuilder.py:149 'BuildEnvironment' object has no attribute 'indexentries'
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/rst2pdf/pdfbuilder.py", line 140, in write
doctree = self.assemble_doctree(docname,title,author,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/rst2pdf/pdfbuilder.py", line 214, in assemble_doctree
t=copy(self.env.indexentries)
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'BuildEnvironment' object has no attribute 'indexentries'
FAILED
build succeeded, 14 warnings.
Install file: "build/doc/api/scons-api.pdf" as "build/doc/PDF/scons-api.pdf"
cd doc && make dirhtml BUILDDIR=/builddir/build/BUILD/scons-4.4.0/build/doc/HTML/scons-api
sphinx-build -M dirhtml -d "../build/doc/api" "sphinx" "/builddir/build/BUILD/scons-4.4.0/build/doc/HTML/scons-api"
Running Sphinx v5.0.2
/usr/lib/python3.11/site-packages/rst2pdf/rson.py:140: FutureWarning: Possible nested set at position 2
splitter = re.compile(pattern).split
WARNING: html_static_path entry '_static' does not exist
[autosummary] generating autosummary for: SCons.Node.rst, SCons.Platform.rst, SCons.Scanner.rst, SCons.Script.rst, SCons.Tool.rst, SCons.Variables.rst, SCons.compat.rst, SCons.rst, index.rst
building [mo]: targets for 0 po files that are out of date
building [dirhtml]: targets for 9 source files that are out of date
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [ 11%] SCons
Required information
- SCons-4.4.0
- Python-3.11.0~b5
- rst2pdf-0.97
- I'm compiling SCons in Fedora 37 (devel branch)
- Linux
- Full build log: https://kojipkgs.fedoraproject.org//work/tasks/2339/90442339/build.log
Are you the scons packager for fedora? If so we can give you access to dedicated channel on our discord server. Note we prefer you bring issues to the scons users mailing list, IRC, or discord server before filing.
That said, there are a number of versions of sphinx which fail building our API docs. If you check out the tree, you should get requirements.txt which list the versions we expect for all pypi packages to build the scons tree.. I think it was <= 5.0.0, or >= 5.1.1
Hmm, odd, we're able to build with rst2pdf at 0.99, which is what's being picked up by a pip install both locally and in our CI documentation build (github action) without hitting this, so we don't have rst2pdf pinned to any particular version. The rst2pdf code locally in the area in question in the version I'm looking at is:
elif hasattr(self.env, 'indexentries'):
# Sphinx 2.3.1 or lower stores the index entries in self.env.indexentries
t = copy(self.env.indexentries)
Which suggests the AttributeError
should not be able to happen, as the hasatter
wouldn't let it be tried?
Are you the scons packager for fedora?
Yes
That said, there are a number of versions of sphinx which fail building our API docs. If you check out the tree, you should get requirements.txt which list the versions we expect for all pypi packages to build the scons tree.. I think it was <= 5.0.0, or >= 5.1.1
Ops! I didn't think of the requirements.txt
file. Thank you
We have Sphing-5.0.2 in devel branch in this moment so i'm forced to pack pre-built SCons documentation in the rpms.
I was building the docs succesfully with 5.0.2 until 5.1.0 dropped (and broke, fixed in 5.1.1), and I'm working on Fedora 36 so I'm still a little mystified what's going wrong...
Using the pre-built manpages is fine, that's what they're there for, to use if needed.
For a perhaps useless data point, I downgraded Sphinx to 5.0.2 on my F36 + virtualenv, and it still builds without problem...
@mwichmann - so currently we can't repro? I just tried with python 3.10. and sphinx 5.0.2. No errors.
Update, I've still not seen this error, I continue building on Fedora frequently, sphinx now up to 7.2.6 (pip installed in a virtualenv, fwiw, rather than from packages, in the case of my regular build, but I occasionally do build on rawhide with distro pkgs as a cross-check). However, just for informational purposes, lxml version 5.x does break building - there's something in the schema files that it now errors out on that it didn't before. Not sure where to take this specific issue... the requirements_dev.txt file in SCons does pin a 4.9 lxml version, and that still seems to be required. The sphinx build of the API docs comes last, and does not affect the building of manpages.