Skip to content

omip: install only the modules a partly frozen package lacks - #844

Merged
bdbarnett merged 1 commit into
mainfrom
omip-partly-frozen
Nov 25, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
omip-partly-frozen

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

When a firmware has part of a package frozen in, omip.install copied the whole package to /lib. Since .frozen comes first on sys.path, only the modules the firmware lacked were ever imported from there. On a small board that copy filled the filesystem.

Now omip installs just the missing modules and says so (Installing only medialink of omnipython). A package that is wholly frozen is still skipped, as before.

A build that leaves modules out on purpose to save flash names them in a frozen _omip_left_out module (MODULES = (...)). omip treats those as present and doesn't install them, so the filesystem the build made room in stays free. The ESP32 Audio Kit firmware is the first to do this: it leaves hmilink, medialink, mp4mux and usb_hid out of omnipython.

Tests: three new cases in tests/test_omip.py (partly frozen, left out on purpose, no marker). The first two fail on main. All 85 tests in the file pass.

…it lacks

A firmware with an older copy of a package frozen in got the whole package
copied to /lib, where only the modules added since would ever be imported.
Now just those land. A build that leaves modules out on purpose names them in a
frozen _omip_left_out module, and omip doesn't install those either.
@bdbarnett
bdbarnett merged commit 5137e40 into main Nov 25, 2026
12 checks passed
@bdbarnett
bdbarnett deleted the omip-partly-frozen branch November 25, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant