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

Uploaded Python 2Python 3Windows x86-64

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

Uploaded Python 2Python 3Windows x86

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

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

Uploaded Python 2Python 3

mpy_cross-1.22.0-py2.py3-none-macosx_11_0_universal2.whl (325.0 kB view details)

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

mpy_cross-1.22.0-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 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.22.0-py2.py3-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f8a6465c6865550c1957cb2a8bf03499b9136a63c915588f911f1967f2a02ce4
MD5 00a15b37408721436b9973b476964701
BLAKE2b-256 27a2254a60857d678f97e7ad4243d091e683dfbee17c410e801f2f7dd95dfbd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.22.0-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.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 f296ce2c293c3a92edf0873376c9f911fdd977c3e9eede384de54f11056010d6
MD5 6abb89f9b1d864b9c85b22b8f5c335dc
BLAKE2b-256 506cfb825171f3ae6a3e460c33af5497fadb77fefe96b3eea17f33003de67897

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3af9132a3fffc35e1da856bcc4b497fe6aeb8d231dc4afb4a0699907cd4b31af
MD5 6d89130355145002b6bfe575e83ebe71
BLAKE2b-256 633b2eb13ce8df45dff1fe1157286281b8238e6d23cb39ce8a1be30ce8fb575f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fc52db68be593941ac71d0f072f9f0f9168d8ad3fa350ea7a5ac5e48c7ad84f8
MD5 849f48e79395b0442121e160193df355
BLAKE2b-256 90d4cce4d7c10a62a9d8680dcfc47466d1d57120fa43043c10a11021c2745d1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c6ad020e7a7d54ae636fa9e4c7cbf308d85d7bfd42c513cd4373629971d1c022
MD5 537572257840b34e1001db950f2201fb
BLAKE2b-256 ce197f3e35d01aa83c0a6eb10903a0c5369519ba0759c192c4d46b60b09744b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 63102bdcdd389c734b0165041b03914235c7283aac358f1fb6729488af0b09b5
MD5 0ce1c97ef622219dc10a3a48e2505ef5
BLAKE2b-256 214791af825230e47fe776683f707521bdb7eec853c9313186a9e6b87132c969

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.22.0-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 f4a39785670b4ee9d2d69dac2a44daf6405b147d7fee5c3962abe1d2e6a63252
MD5 03095094e40b44c346549d00903c10af
BLAKE2b-256 6547add59faa5821b8317ec4c7223ee8bfd682d60ac50e5d714858f43fe766c3

See more details on using hashes here.

File details

Details for the file mpy_cross-1.22.0-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.0-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 a9e1eb4288dee4d78d9f38a64708ae1e6a98772009544efb9af77a75dcb6d0cb
MD5 7c425d32f717f855cc38d3a070c5cfb2
BLAKE2b-256 3f2a178eeb5dfa90899c309d4697d28850f1a059be30f37c1488fade1e146842

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