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 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
-march=<arch> : set architecture for native emitter; x86, x64, armv6, 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.16-py2.py3-none-win_amd64.whl (158.8 kB view details)

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.16-py2.py3-none-win32.whl (148.7 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.16-py2.py3-none-manylinux2014_armv7l.whl (111.0 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.16-py2.py3-none-manylinux1_x86_64.whl (120.5 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.16-py2.py3-none-manylinux1_i686.whl (120.7 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.16-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 (153.3 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.16-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: mpy_cross-1.16-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 158.8 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.16-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 114a2e1b79d82a261be5c3fc1936e419ee5a970b242b9ffe4adac3d9cd553613
MD5 e39665acb399dd1de8b36baac5b4832c
BLAKE2b-256 3bc4fd82452a0088cc50ae6c68dc9c99380c640024085942a6bc73140a30efab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.16-py2.py3-none-win32.whl
  • Upload date:
  • Size: 148.7 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.16-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 e42285258fcee2337d8d3a01e0deb9069bcba7bd4fffea0600d0a211716e5ae7
MD5 0c0fccf85bec480cacaaaf42fb15cfaf
BLAKE2b-256 cca5b0ca5f60532559df9de6e82b00b31f3ba495fc9df2186827d191a66ddf6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.16-py2.py3-none-manylinux2014_armv7l.whl
  • Upload date:
  • Size: 111.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.16-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 c1a3457ea02fcedc1476fff3e04cc4cb6cf951cb85cf9db58272da3ef843bb61
MD5 c4bc91de4fa11f11383e4426c4518217
BLAKE2b-256 d84405c6e13d086f4576449e6ad8974c8893647851697dfce439337e34d43fa4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.16-py2.py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.16-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7dfc17f1a1a9eb501faa9edd980e346e955a79955f2c68e2167b1f809889f627
MD5 8e9217372c5603642684507fb1d4a359
BLAKE2b-256 373af58e125bc07e886add71a308e5a5709257582de974614c79fcb6da8a21f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.16-py2.py3-none-manylinux1_i686.whl
  • Upload date:
  • Size: 120.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for mpy_cross-1.16-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 c75b21736a861ac242ae71acd7d7a2a3d780004ab5e8e85e2fc92e215763e235
MD5 6a13905288c31c1714017abf14a6a7a7
BLAKE2b-256 4c7ff12997f40d63d3538c79bbc40a4d43b0b2c1d8f6a06e2ee4cc8e003b33a8

See more details on using hashes here.

File details

Details for the file mpy_cross-1.16-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.16-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 87f28475c0fd505f42514eb85c31333753cd4b9f20901f67ab827b66279ae614
MD5 c47ac3617ee37d27e879378e0bc91a15
BLAKE2b-256 c992a4fd4be1855d0a5901db816d0982df47dc8992873080832fe3d39781ef53

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