How can I structure package.json to take advantage of --no-mpy option to mip? #17276
-
|
I was today years old when I learned I'm assuming the idea behind My question is this... How can I set up my own package.json to make this work? For example, I have a package.json for my sht3x module that looks like this: I'm assuming I can just add another file in the "urls" to reference the non-mpy version, like this. But, I'm guessing when running How can I make it prefer installing the .mpy file unless --no-mpy is given as an option? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
TL;DR: You can't. the
If you want to offer both .mpy and .py versions then :
|
Beta Was this translation helpful? Give feedback.
TL;DR: You can't.
the
--mpy/--no-mpyoption is only valid when a package is installed from the MicroPython packet indexThat has precompiled .mpy binaries for different bytecode versions, (AFAIK version 6 and up)
--mpyuses 'https://micropython.org/pi/v2/package/6/upysh/latest.json' on a recent board.--mpyuses 'https://micropython.org/pi/v2/package/7/upysh/latest.json' on future boards .--no-mpyuses 'https://micropython.org/pi/v2/package/py/upysh/latest.json' on any board.If you want to offer both .mpy and .py versions then :
package.jsons with different names / locations