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:
-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

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

Uploaded Python 2 Python 3 Windows x86-64

mpy_cross-1.10-py2.py3-none-win32.whl (98.6 kB view details)

Uploaded Python 2 Python 3 Windows x86

mpy_cross-1.10-py2.py3-none-manylinux1_x86_64.whl (73.4 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.10-py2.py3-none-manylinux1_i686.whl (72.7 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.10-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 (85.8 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.10-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: mpy_cross-1.10-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 106.3 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for mpy_cross-1.10-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7506521ae1fbfc02c486bd7b5d71929ddeb60ef98db110a9c5df4d0246aa70ab
MD5 ed9921b0b5f1979c44399a2243f7989b
BLAKE2b-256 861a5f72f27b6ebe290e7ab2541ca596fccbd06027b92eab2abf841b74d66baf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.10-py2.py3-none-win32.whl
  • Upload date:
  • Size: 98.6 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for mpy_cross-1.10-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 4c9b75782b98d2f54e2cd0ba8ae116c942c27fe6e4fb737b203871fdd3ab3034
MD5 9c0bb912fef3f263277553d82b0f4d22
BLAKE2b-256 0665190e515f32c1f24a55ce011715882d5ef2b22e7769866bb2e1512ca3be2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.10-py2.py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 73.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for mpy_cross-1.10-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8338ee998027c632f48b92b9e554898d5c6569961e21ac3fdc668e3bb638cfcf
MD5 db9293106821d513f29ccdd8eb58392a
BLAKE2b-256 d84fcc8f32803fd74869f14734269f860696a0229761eeffe8f40f0e9db4769a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpy_cross-1.10-py2.py3-none-manylinux1_i686.whl
  • Upload date:
  • Size: 72.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for mpy_cross-1.10-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b6a56fcf9ccb3cc9a2bea811201058ea4a7dca338e4bb79a18e4945ae8e7708f
MD5 b4a7e6beb17dea61e8a8e9da51ab8706
BLAKE2b-256 da64508d0459bd17a700c25c7e5353a64efb38eed31cfc7524ef9fee7aa7bdc0

See more details on using hashes here.

File details

Details for the file mpy_cross-1.10-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.10-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 7c941e1d71733badb96ee8d514ac6cd6faafd72bec09573d20d12c396aee2ddb
MD5 a6320f2aa68a0b79048d6fc235840541
BLAKE2b-256 d358769dea611c791d87430b03dc0e415a13ddd5b29f935ae9d22be7f980d309

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