readthedocs / sphinx-autoapi

A new approach to API documentation in Sphinx.
https://sphinx-autoapi.readthedocs.io/
MIT License
439 stars 131 forks source link

Document Python C extensions #100

Closed martingalloar closed 5 years ago

martingalloar commented 7 years ago

My project (pysap) has two components: a pure python library and a C extension. Currently I'm using apidoc for building both, but wanted to switch to sphinx-autoapi as it's cleaner and seems a better approach than importing the modules.

I've already started playing with it in the autoapi branch, by using sphinx-autoapi for the python library and keeping apidoc for the C extension, but I don't see a clear way of integrate both documentation trees.

I'm wondering what would be the best way to support this kind of scenarios. Some ideas:

Any thoughts?

AWhetter commented 6 years ago

We're adding support for autodoc style directives. Would that cater for your use case? That way you can write your pure Python entries with the directives, and use normal Sphinx directives to document that C extension. There's less automation this way but it would allow you to document both the pure python and C extension in your documentation.