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:
-o : output file for compiled bytecode (defaults to input with .mpy extension)
-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
-mno-unicode : don't support unicode in compiled strings
-mcache-lookup-bc : cache map lookups in the bytecode

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

If you're not sure about the file name format, learn more about wheel file names.

mpy_cross-1.9.2-py2.py3-none-win_amd64.whl (109.7 kB view details)

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.9.2-py2.py3-none-win32.whl (102.0 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.9.2-py2.py3-none-manylinux1_x86_64.whl (75.3 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.9.2-py2.py3-none-manylinux1_i686.whl (74.5 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.9.2-py2.py3-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (88.1 kB view details)

Uploaded Python 2Python 3macOS 10.10+ Intel (x86-64, i386)macOS 10.10+ x86-64macOS 10.6+ Intel (x86-64, i386)macOS 10.9+ Intel (x86-64, i386)macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.2-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b764dcec0c3c314644dfc1e1d5336fea191141a888cf1fd5b5746aca1965d437
MD5 60894eb05a4be03e7765dc33218f42d9
BLAKE2b-256 934284d8b18c87cb184250a6016e802ddc44aec280354ef5e2af971d0848421a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.2-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 f55638b97ccfdf61d6fc2409466769df3245d5f8ce72b97490469a4e19c73b5c
MD5 c0b902765e113d14b6e6802872d7f493
BLAKE2b-256 ca35237bb8d75f691e63566f261e464ec0d48a127f49ca3ba84bd4edf5844e36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.2-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dd61c9c5d746c9767ea0b7b4b835956bc5b8fe2e11f7133b3b1675dd7a9b2fc5
MD5 cb35f61796c583c82a9d0ef768880115
BLAKE2b-256 2a482bee4acea63503778813bbd7555db763eab70cc82ed761f27b1835acd27b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.2-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 61896be873f35ec2eb6f3a31cb9cdbe76b6f7e67219c1aa475d9d8adc1505b39
MD5 1e126ddf00c78c9c36fceb2267feccbb
BLAKE2b-256 4b586307d205d1cbe4853a1df49f9480bed48dd54e504311cea2533ea296afbd

See more details on using hashes here.

File details

Details for the file mpy_cross-1.9.2-py2.py3-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.9.2-py2.py3-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 a35340207215e530359402723611a0874c885550e98e72e8d5415a75a819b1f4
MD5 c67a65e9aad9b8b50fdf5bd32955d13b
BLAKE2b-256 80966bde65822cb14f7827ba9dc4446c322727ca319501597f174c3b549c44f7

See more details on using hashes here.

Supported by

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