How to use manifest.py in self-hosted module repository to get .mpy files? #11693
-
I'm trying to figure out how I can use manifest.py to have For example, I recently used mpremote to do a mip install of ssd1306 display drivers. In the micropython-lib GitHub repo the only files I see are ssd1306.py and manifest.py. Yet on my device's flash filesystem, I see ssd1306.mpy. Furthermore, ssd1306.py (on GitHub) is plaintext readable, whereas ssd1306.mpy (on my device) is not. What's the magic ingredient that makes this happen? I thought it was manifest.py. Looking at the docs and the ssd1306 directory on GitHub it looks like the following should do the trick in my case:
But, when I use Is there something else I need to make this work? Something missing in my package.json maybe? Or is this something that only works for the micropython-lib and not self-hosted? Any pointers are appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't know how you got a |
Beta Was this translation helpful? Give feedback.
Now that I think about it and have worked on the
mip
code, I think I can answer your question.Python files inside
micropython-lib
packages get compiled to.mpy
files as part of the GitHub CI workflow, then get stored to thegh-pages
branch ofmicropython-lib
.See this workflow and the CI script.
The actual
.mpy
files get uploaded to https://micropython.org/pi/v2/file (or your own GitHub module repository if you have opted-in and enabled workflows); see build.py for a description of the repository layout (there are provisions for the different flavors of.mpy
files, etc.).See https://github.com/micropython/micropython-lib/blob/master/CONTRIBUTING.md#publishing-packages-from-forks for a d…