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

Uploaded Python 2 Python 3 Windows x86-64

mpy_cross-1.22.1-py2.py3-none-win32.whl (134.4 kB view details)

Uploaded Python 2 Python 3 Windows x86

mpy_cross-1.22.1-py2.py3-none-manylinux2014_armv7l.whl (131.6 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.22.1-py2.py3-none-manylinux2014_aarch64.whl (153.6 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.22.1-py2.py3-none-manylinux1_x86_64.whl (132.5 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.22.1-py2.py3-none-manylinux1_i686.whl (131.7 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.22.1-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 (161.0 kB view details)

Uploaded Python 2 Python 3 macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 09fc2ffdc9decaa0d6be8894dc801b6462e7727bf057a9399aba35041fe7569c
MD5 b0939413890707f9f70db7dd29c45d37
BLAKE2b-256 56ba5c623b32edff776284ae74caebfef73d4319a842ef05485e4637ba027437

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpy_cross-1.22.1-py2.py3-none-win32.whl
  • Upload date:
  • Size: 134.4 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 6bef65d732e18c72a57482f56590d79f722d78bfac14163fa0de9c0f95861a54
MD5 eef794639aced41c3e974871ee516c5c
BLAKE2b-256 bc5ad0f2f7bbe265072621f826c3609ba9afe1aea6fdcb12c99821a763f4d2f6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4e580736487361a27ef7e58c80dff2d9d6c2fe50f7645aa8b7f0686b6257ffe9
MD5 4fbea8ce701f3a7e5298f9402ab7d938
BLAKE2b-256 21ef1fb559d87aa729676c93cd8c8e9db8ba66b80814cd7a04340ac967b5e8bb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ed665f6f4dc9eb5316bdf93348d56b7853a75ea1e3c8507c174118de2898a36d
MD5 e84e5e0405be120a514ec318fdf75d3b
BLAKE2b-256 3e8763a66a9f4d37eab92d83461e19d78eb454f751bb05481f3b559310ba69cd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ff64da8c5693cc40613f688bf4d4f9c8660d93712d43723d3d718019c4b9b8e2
MD5 673cc3585447dd7d7b47b94cd0425a2b
BLAKE2b-256 f0903817d9f6109820d107384625990dcddd207f19f55ba14dcc1205392788d3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.1-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b9f8cd92717523e2e4a8ad40b2e56afe9680d8ba938a0ed666538b722ada8e65
MD5 fbbf36922c26a0311beaa98bc98ab37c
BLAKE2b-256 f2ff4a17c0da40813d6f0f57cc00d3f9753bcc2a3527fa89e87806b65186de38

See more details on using hashes here.

Provenance

File details

Details for the file mpy_cross-1.22.1-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.22.1-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 29b4c6b7c07bb9de64d8ffef41ced7a15f408da7c6a9a3b7f30a4e5f4ea9ba70
MD5 6d467f75260f25c8a70d27c0d57fda69
BLAKE2b-256 7e3ff725751835adc5340b263d7ac54e87786402b451384dd85f918597e1e1f0

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