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.23.0-py2.py3-none-win_amd64.whl (144.6 kB view details)

Uploaded Python 2 Python 3 Windows x86-64

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

Uploaded Python 2 Python 3 Windows x86

mpy_cross-1.23.0-py2.py3-none-manylinux2014_armv7l.whl (131.4 kB view details)

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

mpy_cross-1.23.0-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.23.0-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b1443f299e94d6ac50d9c1121e985fda9969bec8d4491eac5fcbfc38207a3382
MD5 5e0c731bdc8e8d72589ca3bde9f5d031
BLAKE2b-256 28e0643039d555978f356f9d49ce5ec6bb7c22ab7457a83e337b8cd941a6fff3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.23.0-py2.py3-none-win32.whl
  • Upload date:
  • Size: 134.3 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 888659a56e7f477aa9c6435efead1d8747bc02c76577b56746bcb428c56115c5
MD5 8ecb47023d1f045021194a24344d9ae8
BLAKE2b-256 799d340d92f2614eeb29af77ad122fba85a213c9e73340597e8b34d79614c0f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 76c5b8739bf731032b59013656af206a9d23842047f486332b5c4ae2dd1df072
MD5 0508d21c3e3304e8b833fa53bd6f9b44
BLAKE2b-256 ec2f0fd11e00741df28a0e4021b39f40c58fb645854e4d6f502a9c7a29608de3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5db7bde69e9c06e05d5fa74a4f0feb1e6e3d696da8adae3e74d1e5a052685bef
MD5 8d6dd70cc0c6b8542fe4041178967b70
BLAKE2b-256 7e9770bba592e214df540c2f30e0a74b2659ccf4f52c444af1fe752a93f560bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cad720b8e56e3faac24bb2993262b2ef88b3163989bbbc5bf89d9d85aac5f56c
MD5 aa592ebeaaee456686c3bcd211162647
BLAKE2b-256 de5de874654a6b418f1359d79f0111c53355834a73a18d175c9294ff8081feba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 931f925ccdd44032699e468eeeacde24c8e8d3baadb86d6bb7acfa3110abdc8d
MD5 edfd23ad4e9f7edf5fc21f4badf1beb2
BLAKE2b-256 f033617c2464f9edaa61dbfe78bb984eb5eb1a0fc3a4276f56334584960b4c93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 3f951506e792032117caacb2a891159b469e028baa872971f393cbf6a6949ff1
MD5 d7f2440495b73ee4a103a03d612d7639
BLAKE2b-256 d52d815550c13704f75894c5aba27724038dff602ec34269eafa44485a8d2c42

See more details on using hashes here.

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