Skip to content

Third-party installer support

Jason R. Coombs requested to merge feature/installer-support into master

These few commits separate the default, path-based metadata resolver discovery and loading into separate classes, providing a template for how other installers might also attach a distribution resolver to their finders to produce Distributions capable of loading metadata. It installs the PathResolver.resolve function onto the stdlib PathFinder, which I dislike because it has import-time behavior but also because it's adding a public attribute to a stdlib module out of its control. Still, given the naming, I think this change is safe and sane enough.

My biggest reluctance lies in the creation of new PathResolver and PathDistribution objects. Maybe those should be encapsulated in their own modules (.path.Resolver and .path.Distribution).

I'm happy to iterate on this concept with @warsaw and @brettcannon (or others). Is this approach basically sound for the need reported in #2 (closed)? Can you think of a better way to do it? Can the setting of PathFinder.distribution_resolver be avoided without making that a special case?

I look forward to your feedback.

Edited by Jason R. Coombs

Merge request reports