-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support editable install with multiple roots
Python packages may have multiple root modules where each is installed to its own folder under `site-packages`. When using new setuptools editable install in such cases griffe, when used by mkdocstrings fails to find the correct paths. The root cause it that griffe assumed a variable named `MAPPING` in the `.py` file created by the editable install, and assumed that this variable is a dict with single entry. When a package has multiple roots - then this dictionary contain multiple entries. This PR aims to handle such cases. I have no knowledge about `editables` so I could not fix that case. The unit test added simulates the case, and this has been tested against a real complex package with multiple roots using setuptools 65 editable install.
- Loading branch information
Showing
2 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters