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

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.21.0-py2.py3-none-win32.whl (134.2 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.21.0-py2.py3-none-manylinux2014_armv7l.whl (131.4 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.21.0-py2.py3-none-manylinux2014_aarch64.whl (153.4 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.21.0-py2.py3-none-manylinux1_x86_64.whl (132.4 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.21.0-py2.py3-none-manylinux1_i686.whl (131.5 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.21.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 (160.8 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.21.0-py2.py3-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 897578d393dd54be7f682a0fcd755eab7ae82494c659746fe30d52e98ae0afc9
MD5 77cb06a572048fb616f6d2a145f8134c
BLAKE2b-256 58e1c67a584bf3c0430eb4ac0183ef39edb6ff212bbcb5a0d01827fe51c61348

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 3b3c33c0703ddb67b8941994ff1a03727f5e0020b6ebb2d7b4ca82eae0c49541
MD5 d1c7b69e6f4b29386a405705cf43397e
BLAKE2b-256 08544f476c2510401a332869f48ba29c27568414631fc8d42f28a2f66a66dfa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 33a6583c585f370428d7cbedd3fac635413b6db15a497d9907445cf6d410aef0
MD5 be0d97f5babca2209c7178491af340a5
BLAKE2b-256 4bcf1ce363f3c17a2f47f27704b34e176f4b9688b8c6a18714724bcb698ba051

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 693140c1baa106e2324f8720fb715460ea90eff4724687e0960008705c6c8795
MD5 43756884434b5c577ad53d0568fb7926
BLAKE2b-256 eb5bf4e30d400d53d791105c56e0d82e3cfece82aeaad42770b8da509ae886e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a5137020254c1d1bedbe54c570b794f295d3804eb6058e808980f0963b865a2c
MD5 882c6e9ac446fdfcf04ffedeb3950f8a
BLAKE2b-256 13dedc5dba18e122d95a169c0baca57d062bb43da08df49b593fa620f78e7ea4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.21.0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 d09e5eeb5eb389d202b4b3e7b4bca299f33048e3b07c8f101446fd3e10585ddb
MD5 3a4f5fd99f5211fa5f12f98f6cda84b4
BLAKE2b-256 78e337dc7cded2078e6070f9467b84ef65dc31f0a7373bde92f560f3e568d8a5

See more details on using hashes here.

File details

Details for the file mpy_cross-1.21.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.21.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 752ba4b22e2b94ce49beb775e3f676ad6210e3938afb3ce688959d0815c24d6a
MD5 809ba48b5ad0778201236190a9ef2ece
BLAKE2b-256 9d597671426f42c4542bda80a0b14280f8e41ca1236e16b77053fc9f0a2f407c

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