Open pfmoore opened 1 year ago
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 https://github.com/python/cpython/pull/113187 in an attempt to document an example. Please take a look and let me know if that helps or what questions remain.
I've been asked to implement a meta path hook to provide metadata - see https://github.com/pfmoore/editables/issues/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?