# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 PortSystem 1.0 #PortGroup makefile 1.0 name micropython version 1.22.2 revision 0 categories devel lang maintainers {i0ntempest @i0ntempest} openmaintainer platforms darwin license GPL-2 description Python implementation for microcontrollers and constrained systems long_description The MicroPython project aims to put an implementation of Python 3.x on \ microcontrollers and small embedded systems. \ MicroPython implements the entire Python 3.4 syntax (including exceptions, \ with, yield from, etc., and additionally async/await keywords from Python 3.5). \ The following core datatypes are provided: str (including basic Unicode support), \ bytes, bytearray, tuple, list, dict, set, frozenset, array.array, \ collections.namedtuple, classes and instances. Builtin modules include sys, time, \ and struct, etc. Select ports have support for _thread module (multithreading). \ Note that only a subset of Python 3 functionality is implemented for the data types and modules. checksums rmd160 b6216f779261e4fe4f74693ea053668d7aa3c63f \ sha256 bb3ba34848a7620663b6a7cba22af45d3056fc79328c2ceb943874b5478d8756 \ size 81440532 homepage https://micropython.org/ master_sites ${homepage}resources/source/ livecheck.url ${homepage}download/ use_xz yes use_configure no #makefile.override-append \ PREFIX build.env-append CC=configure.cc build.args-append V=1 destroot.env-append PREFIX=${prefix} set python_branch 3.12 depends_build-append \ port:python[string map {. ""} ${python_branch}] post-patch { reinplace "s|PYTHON = python3|PYTHON = ${prefix}/bin/python${python_branch}|" ${worksrcpath}/py/mkenv.mk } if {${name} eq ${subport}} { depends_build-append \ port:pkgconfig depends_run-append \ port:mpy-cross build.dir ${worksrcpath}/ports/unix post-patch { reinplace "s|-Werror||g" ${build.dir}/Makefile reinplace "s|PREFIX = /usr/local|PREFIX ?= /usr/local|g" ${build.dir}/Makefile } post-destroot { set docdir ${prefix}/share/doc/${subport} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} \ README.md LICENSE ACKNOWLEDGEMENTS CONTRIBUTING.md CODECONVENTIONS.md CODEOFCONDUCT.md \ ${destroot}${docdir} } variant preview_v2 description {Preview features in version 2.x} { build.args-append \ MICROPY_PREVIEW_VERSION_2=1 } } subport mpy-cross { categories-delete lang categories-append cross description MicroPython cross compiler utility long_description mpy-cross is the MicroPython cross compiler utility, used to pre-compile \ python files into bytecode suitable for running on your target. build.dir ${worksrcpath}/${subport} destroot { xinstall -m 755 ${build.dir}/build/${subport} ${destroot}${prefix}/bin set docdir ${prefix}/share/doc/${subport} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${build.dir} \ README.md \ ${destroot}${docdir} } livecheck.type none }