On 2/27/20 1:39 PM, Markus Wageringel wrote:
> Yes, the objects.inv files are generated by Sphinx. This is the approach that Sage currently follows with pplpy. The documentation is compiled and installed by the spkg-postinst of pplpy.
>
> Applying this approach to other packages however is not easily doable. When building the numpy documentation for example, numpy will simply download missing inventory files and thus connect to the internet.
In this case, numpy has prebuilt documentation containing the
objects.inv file:
https://numpy.org/doc/1.17/numpy-html.zip
Are there any others that we couldn't build?
> I am not sure how other distributions work, but Homebrew for example
> does not include documentation files. Packages on PyPI also do not
> seem to include the objects.inv file. So in these cases, resolving
> cross-references can only work if we download missing inventory files
> or include them with Sage.
I'm sure it's technically possible to build the docs with homebrew if
somebody asks. They're optionally included in Gentoo for most packages,
and with Debian/Arch/Fedora it's just a matter of asking them to include
a prebuilt *-doc package. Debian and Arch already package the numpy
docs, from what I can tell. Conda/nix should be relatively easy too
since they build from source.
In any case, missing docs on some distro wouldn't be a blocker. Having
the distro provide the docs makes your life easier, but you can always
build the spkg, or just have broken cross-references in your sage docs
if you don't care.