-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
micropip 0.9.0 was just released, which support constraints (e.g. iff package x is installed it must be version y or from URL z). This will be very helpful for jupyterlite site builders as the (likely filtered) output of pip list --format=freeze would get us a step closer to reproducible envs. These won't somehow magically participate in auto-import, as top-level names would still not be available.
When a version of pyodide is released which contains this (or a user builds a custom pyodide distribution containing it), piplite and the %pip magic won't yet support them, and as a "major" version upgrade containing other significant changes (such as vendoring packaging), might just break.
Proposed Solution
- add
constraintsto various wrapper signatures aroundmicropip.install(..., constraints=[])andset_constraints - add
%pip install -c/--constraint- for
pip, this is always a file, but we already support-r/--requirements, so the existing logic should work
- for
- add a way to set default constraints at build time
- discussed previously, adding a
pipliteInstallOptionscould allow for setting all the (non-dependency) options:{ "pipliteInstallOptions": { "constraints": [ "ipywidgets ==8.1.2" ], "index_urls": [], "keep_going": true } }
- discussed previously, adding a
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request