Skip to main content

micropython mpy-cross distribution

Project description

mpy-cross is the micropython cross compiler utility, used to pre-compile python files into bytecode suitable for running on your target.

This project compiles mpy-cross for windows, linux and macos and distributes them in python wheels for easy installation on development pc’s.

Version

The release version of this package directly corresponds to the micropython release it’s built against.

If a wrapper update is needed for a particular release version, it will be updloaded with a .postN version

Weekly releases build against master should be available at: https://gitlab.com/alelec/mpy_cross/pipelines These will have version numbers that reflect the previous release and the current git hash built against.

Usage

mpy-cross can be run in three different ways

  • From python command line

    python -m mpy_cross <args>
    python -m mpy_cross --version
  • From python code

    import mpy_cross
    
    mpy_cross.run(*args, **kwargs)
    
    import subprocess
    proc = mpy_cross.run('--version', stdout=subprocess.PIPE)

where *args are arguments passed to mpy-cross, **kwargs are arguments to pass to subprocess.Popen() internally

  • Standalone

    # Print out path to actual mpy-cross exe
    python -c "import mpy_cross; print(mpy_cross.mpy_cross)"
    > /home/andrew/.local/share/virtualenvs/mpy_cross-gSGkki0d/lib/python3.5/site-packages/mpy_cross/mpy-cross
    /home/corona/.local/share/virtualenvs/mpy_cross-gSGkki0d/lib/python3.5/site-packages/mpy_cross/mpy-cross --version

mpy-cross options

usage: mpy-cross [<opts>] [-X <implopt>] [--] <input filename>
Options:
--version : show version information
-o : output file for compiled bytecode (defaults to input filename with .mpy extension, or stdout if input is stdin)
-s : source filename to embed in the compiled bytecode (defaults to input file)
-v : verbose (trace various operations); can be multiple
-O[N] : apply bytecode optimizations of level N

Target specific options:
-msmall-int-bits=number : set the maximum bits used to encode a small-int
-march=<arch> : set architecture for native emitter; x86, x64, armv6, armv6m, armv7m, armv7em, armv7emsp, armv7emdp, xtensa, xtensawin

Implementation specific options:
  emit={bytecode,native,viper} -- set the default code emitter
  heapsize=<n> -- set the heap size for the GC (default 2097152)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mpy_cross-1.24.0rc0-py2.py3-none-win_amd64.whl (144.7 kB view details)

Uploaded Python 2 Python 3 Windows x86-64

mpy_cross-1.24.0rc0-py2.py3-none-win32.whl (134.3 kB view details)

Uploaded Python 2 Python 3 Windows x86

mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_armv7l.whl (131.5 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_aarch64.whl (153.7 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_x86_64.whl (132.7 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_i686.whl (131.6 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.24.0rc0-py2.py3-none-macosx_11_0_universal2.whl (325.7 kB view details)

Uploaded Python 2 Python 3 macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4d3f51909bb2d385a73df44023abf0e63fb60b7cd1ecb359cea3db53e3a20f5c
MD5 4b32235102357ddbc0c4530cdf0d720f
BLAKE2b-256 14607ea668a674ca7d3a095ea7fa36a99f432910e0e261ee7741a9373e6e1b01

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-win32.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 916333bd078dfcc070a4d0da5c14d2f1d613efc2129d69751648c6a5d72c1271
MD5 d9959f07c33a8fab6c98b954884e5e57
BLAKE2b-256 3246774f752e5689880484d8a7415cbc1df81761dcbe43f4a113ce0f6f425b83

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8c056d0e510e888d27ccb3df0c41adb2c632d11f46c111239576b1dc6ba1960a
MD5 24e89b238fef66a505056375c40efd43
BLAKE2b-256 3ac3c4028cbfcdcc43bc52ccdab7a7a7e093bd353f3775bf08e81df6a7e0204e

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f6d9847777eb85b4a1bf160849a5de233063bff30cd4efcd4c813503eae63d33
MD5 35691ee5bfaab5eae1279b6b7fd14813
BLAKE2b-256 6688f43dd75609674a302ba01e76d39e4c5588162a223fd42a6d9045bad98141

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f54d904f2675bc15eb5ba9561bccb80a671cdef240153b2ef35d1fb3c65f8740
MD5 14c42c3e1f6c8f7dfa8c05930563d1ec
BLAKE2b-256 125dda0374c11489c06c84edb8509515b851b857aa3b0df60a7d10820593dc04

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_i686.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 1722faba372c385daa73475e361f5aa3bdcd9fe2eae264e0056f6fe9931b2c80
MD5 99cbd6938868884f3cd3724c97a87e2d
BLAKE2b-256 8a82497c363aa8bf80cc612faa7667fc4d0ba143d5e798fbd8f2e0e6389115c6

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.24.0rc0-py2.py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for mpy_cross-1.24.0rc0-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 cc7733a3c631d254d998727a99fdb0fe95d76d6a3276030e61e19e30c5759c38
MD5 68feb1fe8345976918f0c788ce65e16e
BLAKE2b-256 614dd0e87ab895a079b5bcc290605cefaa5f1641e00d2fd88a4ef5053fb30d70

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page