Skip to content
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

Merged
merged 1 commit into from
Nov 4, 2024
Merged

CI: Add support for MicroPython #27

merged 1 commit into from
Nov 4, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 1, 2024

There is an install-micropython GitHub Actions workflow by @BrianPugh, that conveniently installs MicroPython in a GHA environment. It works perfectly. Thanks, Brian!

@cla-bot cla-bot bot added the cla-signed label Nov 1, 2024
@amotl amotl force-pushed the ci-micropython branch 2 times, most recently from 042db37 to 6a4840f Compare November 1, 2024 20:26
@amotl amotl requested a review from simonprickett November 1, 2024 20:29
@amotl amotl marked this pull request as ready for review November 1, 2024 20:29
Comment on lines +40 to +45
Invoke example programs.
```shell
export MICROPYPATH=".frozen:${HOME}/.micropython/lib:/usr/lib/micropython:$(pwd)"
micropython examples/example_usage.py
micropython examples/object_examples.py
```
Copy link
Member Author

@amotl amotl Nov 2, 2024

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.

Comment on lines +12 to +14
## Embedded

Todo.
Copy link
Member Author

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.

@simonprickett simonprickett merged commit 360ca9f into main Nov 4, 2024
5 checks passed
@simonprickett simonprickett deleted the ci-micropython branch November 4, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants