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

Uploaded Python 2Python 3Windows x86-64

mpy_cross-1.19-py2.py3-none-win32.whl (150.7 kB view details)

Uploaded Python 2Python 3Windows x86

mpy_cross-1.19-py2.py3-none-manylinux2014_armv7l.whl (112.1 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.19-py2.py3-none-manylinux2014_aarch64.whl (145.6 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.19-py2.py3-none-manylinux1_x86_64.whl (122.6 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.19-py2.py3-none-manylinux1_i686.whl (122.1 kB view details)

Uploaded Python 2Python 3

mpy_cross-1.19-py2.py3-none-macosx_11_0_universal2.whl (316.1 kB view details)

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

mpy_cross-1.19-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 (155.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.19-py2.py3-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8900b2e4f906a8f6d9f62717fc1db0016e5808e5a75d4ca3e70041de7f87a895
MD5 6f3600a086cc40b5cfc922ac10b9c23d
BLAKE2b-256 68fe98756c73bcd5370cddf0965eaef1fdf471069527bf54f534bee9674e1a2e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 6b6a423ff30d35ebdb6c0eb5de99c8784d8dc83845e31874d72b0b63205f4b72
MD5 d42ee24cc1ca1771648ada320538b5a1
BLAKE2b-256 23e24fbd3ccb27ca03b839c8bbec85929794569009b3c27454d256f8fa222101

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8456938ab6e4e670a262c9a39028c8bb49ab1fb26e45c34ff613b195fe0b02d6
MD5 1a8dbcc4a6cc18608e1709cfe1d4b943
BLAKE2b-256 bfcac451ed7c94f6152f9d3b0d364fa21c42ff46c745aaa6704bd3622ea9c33b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1871d84f0f91ee362c310c75fe7b4d1d2b99796a8e5ee77044bfe99da21c412b
MD5 78700d09a2ae63c317ade56e85d64779
BLAKE2b-256 e8664b0e54bb4822679e15a9b27da7b8b3c32f9c4338a3b513db92ee618d9714

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bd978ea55962f1e91e1fe3970f641f18f8e3df4ea250d9f8e135d839308f5fa6
MD5 75d22786739ad0fed9e0514908ff7108
BLAKE2b-256 783577b8acbd09362c6b8f9bbb9368ff61d1a58a00e336815c1e3dda89c20d25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 47a92c7b3bc146217341fc29ef34e7bad9c3261f551e8cfcee7d7aa5cff7fefd
MD5 c04e544ab49bc334b272a74b365a3e98
BLAKE2b-256 e56055bebc767a3fcb7a6a89e20a6ff3942bc8568085b1b8d1ef25a71939dc03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.19-py2.py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 bbb74c05a8a3b2aaf2471f6df5c8f76248853f2d51682eb113d35d29a01c7777
MD5 4c54af5074fecb8db08248c90f6abc43
BLAKE2b-256 57a84b03b0b48e16db2b42dcd092db74f62397cd926ac572db1b42e478e00b89

See more details on using hashes here.

File details

Details for the file mpy_cross-1.19-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.19-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 d34948be6566f5f2e79076aee189c1228b829da40314fb6bbd6b99a63342f3c6
MD5 8a99c0b379d9a4093d2ca894755293f2
BLAKE2b-256 ec20321e615c0e75d3f0e2444ee6639afe94a0c1ae02a38b05e756504fed186e

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