Skip to content

support constraints for transient dependencies? #175

@bollwyvl

Description

@bollwyvl

elevator pitch

Add the concept of constraints for controlling resolution of transient dependencies.

motivation

For a number of use cases, constraints help achieve reproducible environments
with more familiar tools and data than the still-prickly pyodide-lock.json.

design ideas

For parity with the positional dependencies, this would likely be a list of PEP-508 specs which get normalized, either up-front affecting all future solves, or in a one-off install:

micropip.set_constraints(["maybe-transient-dep==1.2.3"])

await micropip.install(
    ["direct-dep"], 
    constraints=[
        "another-transient-dep==4.5.6",
        "yet-another-transient-dep@https://example.com/yet_another_transient_dep.py3-none-any.whl",
    ]
)

In an outer build environment, the output of pip list --format=freeze could provide any "interesting" dependencies to something that should work in the browser, even if they need to be slightly tweaked to avoid any emscripten- or pyodide-specific .whl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions