Skip to content

Add --provided: like --exclude, but require the excluded project is available at boot time. #2426

Description

@jsirois

The --exclude feature is a very sharp tool. It requires you know to arrange the excluded project is made available to the PEX at runtime through --inherit-path / PEX_INHERIT_PATH or PEX_EXTRA_SYS_PATH in the case where the exclusion was configured to save size / bandwidth when the PEX is being deployed to an environment with pre-installed appropriate projects (the huge ML wheel case).

Ideally, Pex would support --provided and instead of discovering a missing --excluded project some time after PEX boot when the import finally triggers (this could be an arbitrary time in the future for dynamic plugin systems or in code with lazy imports in infrequently used code paths.

This idea was originally described here: #2097 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions