-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Document how to write a DistributionFinder
subclass
#427
Comments
I'll see what I can do. There is one example of which I'm aware in Rinoh, although that project does seem to be exhibiting the concerns you've described. I'll take a look and see if I can't come up with a simpler example. |
I've opened python/cpython#113187 in an attempt to document an example. Please take a look and let me know if that helps or what questions remain. |
SonicField
pushed a commit
to SonicField/cpython
that referenced
this issue
May 8, 2024
* Expand the 'Extending' docs to provide a minimal example. Closes python/importlib_metadata#427. Co-authored-by: Hugo van Kemenade <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been asked to implement a meta path hook to provide metadata - see pfmoore/editables#23.
I think that what I need to do is write a custom
DistributionFinder
subclass which I add to sys.meta_path. But the documentation doesn't give much help on how to do that - and a lot of the key classes appear to be undocumented. For example,PackageMetadata
andEntryPoints
, as well as any functions/APIs that exist to parse the contents of aMETADATA
(respectivelyentry_points.txt
) file into those objects (I don't really want to reimplement that functionality myself, when it's clearly already available for the standard finders).Could the documentation be extended to include an example of how to write a complete distribution finder?
The text was updated successfully, but these errors were encountered: