You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generate docstrings for sphinx without building the library #1740
I should mention that this is more a question than an issue.
Issue description
I want to generate source code docs with sphinx for the pybind11 interface of a project. It works fine if I compile the whole project (since the pybind11 interface links to most of the project) and sphinx extracts the docs strings from the .so file. However I want to use readthedocs for automatic doc generation and don't want to build the whole project just for the documentation.
Is it possible to just generate the docstrings with pybind11, so that I can create my sphinx doc without compiling the project?
Reacted by William F Godoy, Brent Huisman, Brian Pugh and Aditya Bhagwat
I don't think that this is possible, but it would be great if it were! IIUC, this is due to how Sphinx works.
RTD can be quite tricky for projects that need building. If you want an example, see here. It uses conda to install dependencies and then builds a pybind11-based project.
I'm currently trying to build a dummy version of the pybind11 interface of my project. Dummy meaning without linking to all of the dependencies, which would make the building much easier. However then I get problems when python imports the shared library (undefined symbols exception). Does anyone have a idea how I can get around this?
Activity
molpopgen commentedon Apr 5, 2019
I don't think that this is possible, but it would be great if it were! IIUC, this is due to how Sphinx works.
RTD can be quite tricky for projects that need building. If you want an example, see here. It uses conda to install dependencies and then builds a pybind11-based project.
spflueger commentedon Apr 9, 2019
Ok. I guess I have to live with the building on RTD solution.
am2222 commentedon Jun 16, 2019
@spflueger Could you build your library on read the docs website?
spflueger commentedon Jun 17, 2019
I haven't tried it yet
spflueger commentedon Jun 26, 2019
I'm currently trying to build a dummy version of the pybind11 interface of my project. Dummy meaning without linking to all of the dependencies, which would make the building much easier. However then I get problems when python imports the shared library (undefined symbols exception). Does anyone have a idea how I can get around this?
PsiXYZ commentedon Nov 13, 2023
If this issue is still relevant:
At now RTD provides some new features to control your documentation generation
It's possible to compile any project before documentation building using jobs: