Skip to content

Some issues with micropython-lib #4

Description

@dhouck

Currently, we include micropython-lib with its standard Buildroot settings. However, in profile.d/python_path.sh, we set MICROPYPATH, and unlike with CPython, that is an override, not an addition.

The obvious solution would be to change that line to

export MICROPYPATH="/mnt/builtin/lib/micropython:.frozen:~/.micropython/lib:/usr/lib/micropython"

so we can keep the original path. However, because of bugs in buildroot and micropython-lib, that wouldnʼt be ideal.

I suggest waiting for the 2026.02 Buildroot release, which probably wonʼt have a fix because itʼs so late in the development cycle, but if it does would make things much simpler.

If it isnʼt fixed upstream, we might want to manually remove /usr/lib/micropython/re.py and /usr/lib/micropython/json from the image (the only other shadowed library we use is select which doesnʼt look like it can cause a problem) and make the MICROPYPATH change. Alternately, it might make sense to decide not to support micropython-lib at all, but I would prefer a different option because having eg. argparse is useful.

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