From c89a69a6ed299b2d692312b4674d176c76038011 Mon Sep 17 00:00:00 2001 From: Dmitriy Serdyuk Date: Thu, 1 Sep 2022 06:48:26 -0400 Subject: [PATCH] Add micropython 1.18 and 1.19.1 (#2443) Support frozen builtin modules e.g. upip --- plugins/python-build/bin/python-build | 2 +- plugins/python-build/share/python-build/micropython-1.18 | 4 ++++ plugins/python-build/share/python-build/micropython-1.19.1 | 4 ++++ plugins/python-build/test/compiler.bats | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 plugins/python-build/share/python-build/micropython-1.18 create mode 100644 plugins/python-build/share/python-build/micropython-1.19.1 diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index e03e4554..52e8a846 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -899,7 +899,7 @@ build_package_micropython() { "$MAKE" $MAKE_OPTS cd ../ports/unix "$MAKE" $MAKE_OPTS axtls - "$MAKE" $MAKE_OPTS CFLAGS_EXTRA="-DMICROPY_PY_SYS_PATH_DEFAULT='\"${PREFIX_PATH}/lib/micropython\"' $CFLAGS_EXTRA" + "$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" mkdir -p "${PREFIX_PATH}/lib/micropython" diff --git a/plugins/python-build/share/python-build/micropython-1.18 b/plugins/python-build/share/python-build/micropython-1.18 new file mode 100644 index 00000000..ce156d2e --- /dev/null +++ b/plugins/python-build/share/python-build/micropython-1.18 @@ -0,0 +1,4 @@ +has_tar_xz_support \ + && { install=install_package; src="https://micropython.org/resources/source/micropython-1.18.tar.xz#96fc71b42ed331c64e1adc5a830ec4f29f2975c23e8751109c03f32b80fa3eb4"; } \ + || { install=install_zip; src="https://micropython.org/resources/source/micropython-1.18.zip#90fa8049cf275310638b9e9c77121f6042f7250b814ef622f9522befde009f57"; } +$install micropython-1.18 "$src" micropython diff --git a/plugins/python-build/share/python-build/micropython-1.19.1 b/plugins/python-build/share/python-build/micropython-1.19.1 new file mode 100644 index 00000000..86068968 --- /dev/null +++ b/plugins/python-build/share/python-build/micropython-1.19.1 @@ -0,0 +1,4 @@ +has_tar_xz_support \ + && { install=install_package; src="https://micropython.org/resources/source/micropython-1.19.1.tar.xz#940e3815e8c425c6eaed3a2aa30d320220cc012a2654b6e086e1b6f0567df350"; } \ + || { install=install_zip; src="https://micropython.org/resources/source/micropython-1.19.1.zip#7047ce208627457c6881850527edb78189a1855a974aa34e2d929c9a3b3c5cc3"; } +$install micropython-1.19.1 "$src" micropython diff --git a/plugins/python-build/test/compiler.bats b/plugins/python-build/test/compiler.bats index 70049d75..96c30423 100644 --- a/plugins/python-build/test/compiler.bats +++ b/plugins/python-build/test/compiler.bats @@ -115,6 +115,6 @@ DEF #assert_success assert_output <