mkdocstrings / griffe

Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API.
https://mkdocstrings.github.io/griffe
ISC License
267 stars 38 forks source link

feature: Support meson-python's editable installs #229

Closed pawamoy closed 5 months ago

pawamoy commented 5 months ago

Is your feature request related to a problem? Please describe.

meson-python puts compiled modules in a build/cp311/src/package folder, while any Python sources remain in src/package, taking precedence over the folder with compiled modules. Therefore Griffe never scans the compiled modules.

Describe the solution you'd like

I suppose that, in some cases such as this one, we could mark some directories as "always scan". The functions that handle pth files and editable modules should therefore return additional information like, "should this directory be always scanned?". The Finder would store them in a map: {"package_name": ["additional_folders"]}, and use that map in its submodules or iter_submodules method.

Describe alternatives you've considered/

/

Additional context

https://github.com/machow/quartodoc/issues/323