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

Uploaded Python 2 Python 3 Windows x86-64

mpy_cross-1.9.1-py2.py3-none-win32.whl (102.2 kB view details)

Uploaded Python 2 Python 3 Windows x86

mpy_cross-1.9.1-py2.py3-none-manylinux1_x86_64.whl (75.4 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.9.1-py2.py3-none-manylinux1_i686.whl (74.6 kB view details)

Uploaded Python 2 Python 3

mpy_cross-1.9.1-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 (88.2 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.9.1-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for mpy_cross-1.9.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fdb028654cf424315681a6b0ed56fba9719ea51ad2a94346cc5e74f8c20c0600
MD5 085dd5ef9034104118ea81c05a12f37e
BLAKE2b-256 159a88213ec0eb034af4ade91a6908ba2e18b35004d6d8d89390c41976e77861

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 d2b6970fb7fc4047349d65228fc3dd311a5f7f7179a1ac0cdb98a91774c3f91b
MD5 087391a0b67eda3a25e4275fe670e059
BLAKE2b-256 682d9725f3509dcc3e527a069ea19b8284505b1ef06606351fc6ca6b2431f54f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.1-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 82ca0a7252cd36e063e14b8dafbf2a563f7d47485ae6671f823820e61aa41d7f
MD5 37ea5688e022ec5b469ff2d3447e4cb9
BLAKE2b-256 682cdfec2eddde7b05889e2f9c4a9e623d5ac418f8801cf189b1cba95d56e557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mpy_cross-1.9.1-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 051d95306d96181f90f860108387f0825e5c5cc004ee69f3b79e59b4a1a9f009
MD5 13230acda0856f13c9193ae54dc30bcd
BLAKE2b-256 abde3f9a3d510a7bc61dc6103b6a754ff25f933ec43dd1efd604ad59bea5e4b1

See more details on using hashes here.

File details

Details for the file mpy_cross-1.9.1-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.9.1-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 b5bfcd4926f760e8bbd9e9f4ae3ad205a4bf970e76841f121ed98475d26631f3
MD5 2e934dd617390276d072a925fa3b73e7
BLAKE2b-256 91dc50114049bfa48f094c09e0d409281a271356460244984ebdf11cb37ccf92

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