1

I'm basically asking the same question as this: Is there a good way to produce documentation for swig interfaces?

However, that one was like two years old and now there is sphinx.

Question is, can sphinx automatically get something out from the python code that swig produces, or does one need to manually 're-enter' the documentation that is in the C++ code?

Community
  • 1
  • 1
Totte Karlsson
  • 1,261
  • 1
  • 20
  • 55

1 Answers1

2

SWIG does not yet support extracting class/method/function documentation from comments in C++ header files. The closest you can get is the %feature("autodoc", level) and %feature("docstring") as explained in section 36.10 Docstring Features of SWIG docs. It looks as though some work on extending SWIG to recognize Doxygen tags to generate javadoc and python docstrings occurred as part of "Summer of Code 2012", but it doesn't look like there has been any further work on it since.

Oliver
  • 27,510
  • 9
  • 72
  • 103