From dfe7c07ade046a26ed97232ec8288b48dc8a27ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 13 Aug 2023 11:27:11 +0300 Subject: [PATCH] Add micropython 1.20.0 The unix port no longer uses axtls. Earlier versions do, but only 1.9.x requires it to be separately built; newer ones have the dependency in order. --- plugins/python-build/bin/python-build | 3 ++- plugins/python-build/share/python-build/micropython-1.20.0 | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 plugins/python-build/share/python-build/micropython-1.20.0 diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 7d0b2a16..fc668568 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -925,6 +925,7 @@ build_package_ironpython_builder() { } build_package_micropython() { + local package_name="$1" if [ "${MAKEOPTS+defined}" ]; then MAKE_OPTS="$MAKEOPTS" elif [ -z "${MAKE_OPTS+defined}" ]; then @@ -933,7 +934,7 @@ build_package_micropython() { { cd mpy-cross "$MAKE" $MAKE_OPTS cd ../ports/unix - "$MAKE" $MAKE_OPTS axtls + [[ $package_name == micropython-1.9.* ]] && "$MAKE" $MAKE_OPTS axtls "$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\".frozen:${PREFIX_PATH}/lib/micropython\"' $CFLAGS_EXTRA" "$MAKE" install $MAKE_INSTALL_OPTS PREFIX="${PREFIX_PATH}" ln -fs micropython "${PREFIX_PATH}/bin/python" diff --git a/plugins/python-build/share/python-build/micropython-1.20.0 b/plugins/python-build/share/python-build/micropython-1.20.0 new file mode 100644 index 00000000..64705710 --- /dev/null +++ b/plugins/python-build/share/python-build/micropython-1.20.0 @@ -0,0 +1,4 @@ +has_tar_xz_support \ + && { install=install_package; src="https://micropython.org/resources/source/micropython-1.20.0.tar.xz#098ef8e40abdc62551b5460d0ffe9489074240c0cb5589ca3c3a425551beb9bf"; } \ + || { install=install_zip; src="https://micropython.org/resources/source/micropython-1.20.0.zip#6a2ce86e372ee8c5b9310778fff7fca1daa580afa28ea755f1a303675a8612b7"; } +$install micropython-1.20.0 "$src" micropython