diff --git a/conf/layer.conf b/conf/layer.conf index 722f801..201c1ba 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,3 +9,5 @@ BBFILE_PATTERN_meta-micropython := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-micropython = "7" LAYERDEPENDS_meta-micropython = "core" + +LAYERSERIES_COMPAT_meta-micropython = "honister hardknott gatesgarth dunfell" diff --git a/recipes-devtools/micropython/micropython-lib_1.8.6.bb b/recipes-devtools/micropython/micropython-lib_1.9.3.bb similarity index 69% rename from recipes-devtools/micropython/micropython-lib_1.8.6.bb rename to recipes-devtools/micropython/micropython-lib_1.9.3.bb index a63e9ac..508e5b2 100644 --- a/recipes-devtools/micropython/micropython-lib_1.8.6.bb +++ b/recipes-devtools/micropython/micropython-lib_1.9.3.bb @@ -5,17 +5,14 @@ SECTION = "devel/python" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=b4c9cf84e44b0961b744ae0ca6617ae6" -inherit autotools - INC_PR = "r1" PR = "${INC_PR}.0" SRC_URI = " \ - https://github.com/micropython/micropython-lib/archive/v${PV}.tar.gz;name=src \ + git://github.com/micropython/micropython-lib.git;name=src;tag=v${PV} \ " -SRC_URI[src.md5sum] = "e0b313e7d6378f52607844fd30d79630" -SRC_URI[src.sha256sum] = "eb696009ff8c33004211e484649b34edb14f3efb2ff618942bc8888716757a55" +S = "${WORKDIR}/git" RDEPENDS_${PN} = "micropython" RDEPENDS_${PN}-native = "micropython-native" @@ -37,5 +34,3 @@ do_install() { FILES_${PN} = " \ ${libdir}/micropython/* \ " - -BBCLASSEXTEND = "native" diff --git a/recipes-devtools/micropython/micropython/001-force-python3.patch b/recipes-devtools/micropython/micropython/001-force-python3.patch new file mode 100644 index 0000000..b292e82 --- /dev/null +++ b/recipes-devtools/micropython/micropython/001-force-python3.patch @@ -0,0 +1,9 @@ +diff -ur git.org/tools/make-frozen.py git/tools/make-frozen.py +--- git.org/tools/make-frozen.py 2021-05-08 11:07:17.883825233 +0000 ++++ git/tools/make-frozen.py 2021-05-08 11:07:57.808084055 +0000 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Create frozen modules structure for MicroPython. + # diff --git a/recipes-devtools/micropython/micropython_1.8.7.bb b/recipes-devtools/micropython/micropython_1.15.bb similarity index 52% rename from recipes-devtools/micropython/micropython_1.8.7.bb rename to recipes-devtools/micropython/micropython_1.15.bb index dbbf8fd..edb3a7a 100644 --- a/recipes-devtools/micropython/micropython_1.8.7.bb +++ b/recipes-devtools/micropython/micropython_1.15.bb @@ -3,46 +3,54 @@ HOMEPAGE = "https://micropython.org" SECTION = "devel/python" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a8a14efdd86622bc2a34296228779da7" - -inherit autotools-brokensep +LIC_FILES_CHKSUM = "file://LICENSE;md5=4d13714d609dce89ca5832f2e0864344" INC_PR = "r1" PR = "${INC_PR}.0" SRC_URI = " \ gitsm://github.com/micropython/micropython.git;name=src;tag=v${PV} \ + file://001-force-python3.patch \ " S = "${WORKDIR}/git" -DEPENDS = "libffi" +DEPENDS = "libffi python3-native" -CPPFLAGS_append = " -Wno-error" +inherit autotools-brokensep EXTRA_OEMAKE = " \ - -C ${S}/unix \ MICROPY_USE_READLINE=0 \ V=1 \ DESTDIR="${D}" \ CC="${CC}" \ LD="${LD}" \ CROSS_COMPILE="${TARGET_PREFIX}" \ + CWARN=" -Wno-error" \ PREFIX="${D}/usr" \ + PYTHON="python3" \ " do_compile() { - oe_runmake axtls - oe_runmake micropython + make -C ${S}/mpy-cross + oe_runmake -C ${S}/ports/unix submodules + oe_runmake -C ${S}/ports/unix } do_configure() { : } -RRECOMMENDS_${PN} = "micropython-lib" +do_install() { + install -d ${D}${bindir}/ + cp -r --preserve=mode,links ${B}/ports/unix/micropython ${D}${bindir}/ +} + +FILES_${PN} = " \ + ${bindir}/micropython \ +" -INSANE_SKIP_${PN} = "already-stripped" -BBCLASSEXTEND = "native" +RRECOMMENDS_${PN} = "micropython-lib" +INSANE_SKIP_${PN} = "already-stripped ldflags"