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

Uploaded Python 2 Python 3 Windows x86-64

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

Uploaded Python 2 Python 3 Windows x86

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

mpy_cross-1.23.0.post1-py2.py3-none-macosx_11_0_universal2.whl (1.8 MB 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.post1-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8fb98d149aaab00aeaf138b26028c507d0b68b2e5cc857bca9be8f7884c2f9cd
MD5 48eeed0278f7c15ce7f47dc2c1b7a5f0
BLAKE2b-256 c52ccfd92aa74b24496caefcfefb2951599d9dcea3bf9a26711694fee161330e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 b99b08cd047dff87cbad9299e0091770ac3304eb9622d84fe0b04b80764b53a5
MD5 1fdb698ab40669870a80aebc09020f3c
BLAKE2b-256 d88bc7e0a0821bcbeb4b65dc9a087311a1dff5aa5c84edfc4ea19956755c58dc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 63ee053247dd8cd462b6e8b020253b9d81fac82725b24d31fece3f79308ab639
MD5 8096986d53ab956343f20af4c337b63c
BLAKE2b-256 0a865a93e3793a8d0a487d57b8eee8f006323494c3889dc3319394baa340a92c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 94fdddd1b2dfbb8dd83a52fcaba0d45c512b596f05c91c07a552e14a481a2e94
MD5 05ff7e53caa76cf8d6fdf38c3a7c1b3f
BLAKE2b-256 8c43b96f70f166a5174df3a4b2f7dc963bc59005ca2f22d015ef943bc12c5cc7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a2d4c10fffc1488e9049a95d4b258b26a16b99e39319ea20d0a597e806726da7
MD5 073965976f2e506672117c8fe327e969
BLAKE2b-256 71e2a78eb90c23e8d04b31c4d6c6e94184af5ffc9d716e58c47735bafe4044ea

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 e65f09795aec0388198233a1f6e3abcb8c8364d2cbffad2eb99e6ec475ad38e8
MD5 4bb9bfb3247e85819e788ee7b81d7435
BLAKE2b-256 7a95f421c58e755c5d8dcb3270dc28655b2812919b794590e3f5cd9e2fbf753e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0.post1-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 4954766e908819c765bc0641de1c6a3d0a644761db8395ea2ff93243d1a22eec
MD5 4f6133cd29dade8f72acf49ee3ed9c4a
BLAKE2b-256 c645cd33ef4522d77ffcf9a8852ac2ac16bb69771c4d0c985608298a424c96ef

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