-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Add support for MicroPython #27
Conversation
042db37
to
6a4840f
Compare
Invoke example programs. | ||
```shell | ||
export MICROPYPATH=".frozen:${HOME}/.micropython/lib:/usr/lib/micropython:$(pwd)" | ||
micropython examples/example_usage.py | ||
micropython examples/object_examples.py | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Contrary to PYTHONPATH, MICROPYPATH is not appended to the module search path sys.path
. Instead, it overwrites it.
[...] because MICROPYPATH environment variable fully overrides module search path (unlike CPython, where it just augments builtin paths).
-- https://forum.micropython.org/viewtopic.php?f=15&t=5869&p=33595&hilit=MICROPYPATH#p33595
This is why we need to configure it fully when aiming to adjust it for adding $(pwd)
.
About search path mangling for testing purposes, see also: https://forum.micropython.org/viewtopic.php?t=4622.
## Embedded | ||
|
||
Todo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit.
Well, this section may absorb a few words about how to whip the example programs onto a device, both for vanilla MicroPython, and CircuitPython, eventually also using a separate documentation file for the latter.
I mean, as long as this project bears just or primarily a README, it will be perfectly fine to keep that in README » Installation, so maybe just refer to that section until the project will gain a dedicated documentation slot, rendered on RTD for example, where docs/
will need to be polished further.
There is an install-micropython GitHub Actions workflow by @BrianPugh, that conveniently installs MicroPython in a GHA environment. It works perfectly. Thanks, Brian!