Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Precompiled versions of mpy-cross for CP 4, 5, 6
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Precompiled versions of mpy-cross for CP 4, 5, 6

by kevinjwalters on Mon Jul 27, 2020 7:12 am

For CircuitPython 2 and 3 there are precompiled versions of mpy-cross available on Creating and sharing a CircuitPython library: Overview. Is there a place to download mpy-cross for versions 4, 5, 6? My understanding is the current recommendation is to match the mpy-cross version to the major version number as there can be changes in bytecode (.mpy) format, is that correct?

There are instructions for compiling on Building CircuitPython: Build CircuitPython and Adafruit Forums: how to precompile a .py file to a .mpy file Windows 10. Those might be a bit involved for a portion of the CircuitPython audience.

Are there any plans to change the name of mpy-cross? It clashes with MicroPython's mpy-cross. I presume pip install mpy-cross is NOT the answer here for CircuitPython as it gets the MicroPython incarnation?

kevinjwalters
 
Posts: 738
Joined: Sun Oct 01, 2017 3:15 pm

Re: Precompiled versions of mpy-cross for CP 4, 5, 6

by tannewt on Mon Jul 27, 2020 4:49 pm

kevinjwalters wrote:For CircuitPython 2 and 3 there are precompiled versions of mpy-cross available on Creating and sharing a CircuitPython library: Overview. Is there a place to download mpy-cross for versions 4, 5, 6? My understanding is the current recommendation is to match the mpy-cross version to the major version number as there can be changes in bytecode (.mpy) format, is that correct?


Yes, we recommend matching CPY version to mpy-cross version because there are occasional breakages between versions. (We expect 7.x to be incompatible with 6.x for example.)

In general, I don't recommend using it manually though. I expect most people to use py files directly. mpy mainly optimizes the load memory of libraries.

kevinjwalters wrote:There are instructions for compiling on Building CircuitPython: Build CircuitPython and Adafruit Forums: how to precompile a .py file to a .mpy file Windows 10. Those might be a bit involved for a portion of the CircuitPython audience.

Are there any plans to change the name of mpy-cross? It clashes with MicroPython's mpy-cross. I presume pip install mpy-cross is NOT the answer here for CircuitPython as it gets the MicroPython incarnation?


It's not a bad idea to rename it but not a priority for me because it should be rarely used directly.

tannewt
 
Posts: 1787
Joined: Thu Oct 06, 2016 8:48 pm

Re: Precompiled versions of mpy-cross for CP 4, 5, 6

by kevinjwalters on Mon Jul 27, 2020 5:38 pm

Thanks, is there somewhere to download the mpy-cross binaries for version 5 and 6?

kevinjwalters
 
Posts: 738
Joined: Sun Oct 01, 2017 3:15 pm

Re: Precompiled versions of mpy-cross for CP 4, 5, 6

by danhalbert on Tue Jul 28, 2020 2:21 pm

We have not changed the .mpy format since 3.x, so the old mpy-cross compilers are still fine. We are actually building mpy-cross for various platforms, but right now they are discarded instead of being uploaded for each build. We need to add a Windows build

danhalbert
 
Posts: 2118
Joined: Tue Aug 08, 2017 12:37 pm

Re: Precompiled versions of mpy-cross for CP 4, 5, 6

by kevinjwalters on Tue Aug 04, 2020 8:19 am

Thanks. BTW, mpy-cross gets mentioned in https://learn.adafruit.com/welcome-to-c ... -questions wrt MemoryError exceptions.

kevinjwalters
 
Posts: 738
Joined: Sun Oct 01, 2017 3:15 pm

Re: Precompiled versions of mpy-cross for CP 4, 5, 6

by danhalbert on Tue Aug 04, 2020 9:11 am

mpy-cross executables are now available at https://adafruit-circuit-python.s3.amaz ... mpy-cross/. Any of these will work. You can use these 6.0.0 executables for 4.x, 5.x, and 6.x.

danhalbert
 
Posts: 2118
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.