Skip to content

More general unvendoring mechanism #3092

@rth

Description

@rth

Currently, we unvendor tests via the build/unvendor-tests flag. It could be useful to additionally have a more generic unvendoring mechanism to unvendor other sub-components. For instance, some packages have included datasets (sometimes rather large) that it could be useful to unvendor: geopandas 1MB, scikit-learn 0.5MB, scikit-image: 7.5MB

Maybe it could be a flag of the form,

build:
    unvendor:
         - package-name: <regrex or glob>
         - package-name2: <regex or glob 2>

Also,

  • ideally, the list of unvendored packages for a given package should be easily discoverable in the repodata.json (including the unvendored tests)
  • we could add another MetaPathFinder similar to UnvendoredStdlibFinder which for a given ImporError, looks at the path, checks it's in a known top_level fields, and if it raises a meaningful error about how to install the missing component with micropip. This would improve a lot the usability of unvendored packages.
  • The previous step would require that the top_level entries are correctly auto-determined from the unvendored packages (which is likely not the case currently). Related Parse top-level import name from wheel file #3006

Metadata

Metadata

Assignees

No one assigned

    Labels

    OSSCA2025Good first issue for OSSCA2025 participantsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions