Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support editable install with multiple roots #126

Merged
merged 2 commits into from
Jan 18, 2023

Commits on Jan 18, 2023

  1. 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.
    gilfree committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    61e9725 View commit details
    Browse the repository at this point in the history
  2. Update src/griffe/finder.py

    pawamoy authored Jan 18, 2023
    Configuration menu
    Copy the full SHA
    3478e86 View commit details
    Browse the repository at this point in the history