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

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

mpy_cross-1.22.0.post1-py2.py3-none-win_amd64.whl (998.9 kB view details)

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

mpy_cross-1.22.0.post1-py2.py3-none-macosx_11_0_universal2.whl (1.8 MB view details)

Uploaded Python 2Python 3macOS 11.0+ universal2 (ARM64, x86-64)

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1d3234895e7bd35bb10449b424c0273e70501bf3467f77c8a5a95461dc4394e0
MD5 0b094c68239dda9d8bcae5138fff0822
BLAKE2b-256 a9c00f05dbbac948a17a30d8ca70addfb017334e9d3e78747921e33540a02012

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 524fb216da23c1800a2473249e5a27bb4c67860f592ee8e40be57812a2680556
MD5 045b0612000093ca1f473731dc5ae453
BLAKE2b-256 cdb6429b7a64f8c2e8f8d52a9051c62601998a7f0c1fb4050a3c47a1528976ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 53ba25cfe6814db5a828ce93cf2805478c264e5d110829fa8d378c99f27a28db
MD5 aab66bf4863c7a27e236112b7f45cb7a
BLAKE2b-256 03f4704cbe502eb7cacad93519b3b93a29eb41eefc9f368d5018c0674ad8a903

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5ba2b36d429ae37e2c30c41601a55409939f2e584ce147997667d4f3da72521b
MD5 67caa9578c59caaaa4dc044fcf96ecc9
BLAKE2b-256 4203a4f59344c47b932ab662dd89acb1688c7b9c6e7dd3b9f07d071776e40db0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fb9ffe66c0abe00e49366be4ca40710f85ff95fc30167d30fd0acf77c7ae49b7
MD5 4a52e2081e0e2fbb6a36cd2cefb1ca03
BLAKE2b-256 87812afb4a5110ec22faefe3b7d956b5b9a3af11f5de62d85b35ec141e2f9370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a1645494db70154d0c0e993aaa4fb64df16418fb0582d3ca1f662166dcc45f2b
MD5 f6bd568c369bd75daef37b50e5c6287f
BLAKE2b-256 8e0345b9c7cb3edb4134585f6b281def2e61c524261ff1bcf92f85be930f0052

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0.post1-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 cd9185c4d4fa0dd98e6861b81d828d756d67a6bd247e39feb0199226976de009
MD5 1cb98fecf8274a386ad5f808c04c65f6
BLAKE2b-256 50888e61b430ee0f3a7a50f5fbe0dee6685b4bb2fc19841cffa86c2c0d529498

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