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

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.9.4-py2.py3-none-win32.whl (99.7 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.9.4-py2.py3-none-manylinux1_x86_64.whl (73.4 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.9.4-py2.py3-none-manylinux1_i686.whl (72.7 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.9.4-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 (86.2 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.4-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.9.4-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6d19ed00833368c2365be869a23b8263c39fb2670c0df92b60184ef8e69126d0
MD5 7f7453ca2005af5ac37a1b3f4744cca0
BLAKE2b-256 dd07c54049c5a7a3944b69a8da007d730d914ba0987d320e389afb129208d43c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.4-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 6d805426146df0373ba51fd928217c9b87071a2a6fa8a0dadd3ef48a2ee5473e
MD5 ceddc38d1e41cd2f3fefcc651f70c766
BLAKE2b-256 45711040ae9c3579d71aa631fc90cd8bc22f5d2c485ed3bfc1cf05b5809ff453

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.4-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 19d87dc227df613193817cb436a14f35e8db7abe0e97f05eb644fb44091938ca
MD5 29714f990dffa5aea794e3791ea7ff09
BLAKE2b-256 db9f85dd8287ef076cb8fab3feae051f4591fc45198a7aed91e9e9cdba93766a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.4-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7f255f7c5867f46a2a2aede70c5a8a66ac4f3b856165dc08ed2740ff8044f085
MD5 b50f4e3fb50edce46472b2614d6648dd
BLAKE2b-256 693981dffc58a9885f991ad84753206db53d32d1e25b146a5c5c2944d9cb41b8

See more details on using hashes here.

File details

Details for the file mpy_cross-1.9.4-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.4-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 156f57ee2114c2e3ccd47584f041e538972e77c129163c8f83bfdbd38f73cdd2
MD5 472aba8937b625c78ebeb9d02bd55380
BLAKE2b-256 1c29542ed808dca7eeffe10f25e600b2ea57513e86d47843151e0b0a45555275

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