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

Uploaded Python 2 Python 3 Windows x86-64

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

Uploaded Python 2 Python 3 Windows x86

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

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

mpy_cross-1.23.0rc0-py2.py3-none-manylinux1_x86_64.whl (132.6 kB view details)

Uploaded Python 2 Python 3

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

Uploaded Python 2 Python 3

mpy_cross-1.23.0rc0-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.1 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.23.0rc0-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e302c0d3e6c72f9f66fdc97cfae479bde64511d0652ab89fba18887c34d0b429
MD5 89672fd3119e4161da65d5cbc3b5486d
BLAKE2b-256 0f2d794cf8d3d8c25dbb3463c023797916631b9444d92122968c9fa707561ba0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 16a67b3a9b38398ede63e81f9fb9ff581ebbfe93d3c2e2bc7f728836373d1dce
MD5 105cb6a47872610b711746f46454ca52
BLAKE2b-256 34720d67204716c07b09c3b1b191adbb072b19cca7bf939821decebaaf2417e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3ddc988b99529b9351ea9fe36be375efaa0b783e630c658037387268bc0d0ca2
MD5 7669b17fe3f20a7426d5b612b99995f5
BLAKE2b-256 972d2bce39c406675f7468f7d3c04706d485a876b3f24d976f55f3912ed46d4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 db57c9144bba2a1eb0e756c10db8c86192ee9c03b08dbb66d63d3cfd1c28738a
MD5 65efa976648085091e18ef321179f448
BLAKE2b-256 ffa4fad37bd95d8843781998d228d08844e178b4f20be9195817ae73d9807d30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 81664d00825b1d98b58584c06ec70ad2fceecd4ebefec9436ec7cf1845b7d4cc
MD5 70ed58794e1f0f4a4c462dea797efc16
BLAKE2b-256 682f6e1932e266d617d7c29fbce7554e7477b7733de2b30531040b16d5c32724

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.23.0rc0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 83e132edf2cf3df9ac3b0b2cb3c49f067763bdb92ccfa0b478fec01d11fe261a
MD5 ca3be9a70f0200921e65e89e41d1fc6e
BLAKE2b-256 783f3e6c36b4e27a653fd51e90f97678525e8c8f67dee51010c741455af91069

See more details on using hashes here.

File details

Details for the file mpy_cross-1.23.0rc0-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.23.0rc0-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 ad684e254196ef6bc5f89685492d5389c66e516d7fe1f6a9663078ed3d914fcb
MD5 34006d05a4e432abb53db551c82db085
BLAKE2b-256 0245344d84326196f24bede1d86752a6a25bed9afed29515925400e110dcf175

See more details on using hashes here.

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