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 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
-march=<arch> : set architecture for native emitter; x86, x64, armv6, 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

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

mpy_cross-1.15-py2.py3-none-win_amd64.whl (158.7 kB view details)

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.15-py2.py3-none-win32.whl (148.7 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.15-py2.py3-none-manylinux2014_armv7l.whl (111.1 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.15-py2.py3-none-manylinux1_x86_64.whl (120.5 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.15-py2.py3-none-manylinux1_i686.whl (120.8 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.15-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 (153.4 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.15-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: mpy_cross-1.15-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 158.7 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.15-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7961db56f058bef9a954d5090c93f01fc5bcedcf6a2d471d6016204d8362ab4a
MD5 35e93018148aaec70fee24613b0d62b2
BLAKE2b-256 d31f93d3a6913f59d580ac56112e8132207d308573f63b426ce47634f594a757

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.15-py2.py3-none-win32.whl
  • Upload date:
  • Size: 148.7 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.15-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 89666a167be20cea46a3de72af5fe099788bb0a0077d53dd6b6653cf2ae2f6d0
MD5 13118206cbaa06ef96dfa2c9af7e15fa
BLAKE2b-256 46663c4ed8aaadaab9dc43a968bbbf327b366cde4da85917ad3dba9e69d37a49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.15-py2.py3-none-manylinux2014_armv7l.whl
  • Upload date:
  • Size: 111.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.15-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 0de4891394b47047ff46e9cf5aeea4397dc7a9a32e99329ed8eee86bc1bee71c
MD5 7cd18fe6c0a9bfb5ab318ca6f228cc43
BLAKE2b-256 b7ff773c271bb47ed30aef3905ba3e97d0d9c3f6b6f394826311808b008f80c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.15-py2.py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.15-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d9189cc449a0094296efbaf15ae38ddc03f093e92f413709d3b23ce86899cb07
MD5 9985f966f239ac317634ca25d9d4b5c3
BLAKE2b-256 9aba090f28307f049d1cbcc294240b51e72950af9751ec8317868c569d0ff811

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.15-py2.py3-none-manylinux1_i686.whl
  • Upload date:
  • Size: 120.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.15-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4308bbf25f0c94be961f1c062a8b938dc1787295e30c16f52f851fb382312c24
MD5 e3aee571e9a70e843ce432968c323866
BLAKE2b-256 29d90e4ee65625f9e631865b9171ac1661c0e5fa1b7fe259a92fef7ed9612fed

See more details on using hashes here.

File details

Details for the file mpy_cross-1.15-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.15-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 a73df33b33829161f043f7a60af6d46021d12a2ecc6ce7ca2217404446d4adf8
MD5 5bab07a1bb25c66ebb4fbd6089db42ed
BLAKE2b-256 7b7864af2130c8deb0d9795ed1e3ebbff5968b053577d7523328533ae96d0a91

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