micropython-mpremote: Add new package
authorJeffery To <jeffery.to@gmail.com>
Mon, 29 May 2023 18:25:20 +0000 (02:25 +0800)
committerJeffery To <jeffery.to@gmail.com>
Sat, 3 Jun 2023 17:00:22 +0000 (01:00 +0800)
From the README:

This CLI tool provides an integrated set of utilities to remotely
interact with and automate a MicroPython device over a serial
connection.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit a83dcf0d5cf20942db27e23e9aff80c7ae373822)

lang/python/micropython-mpremote/Makefile [new file with mode: 0644]
lang/python/micropython-mpremote/patches/001-no-importlib_metadata.patch [new file with mode: 0644]

diff --git a/lang/python/micropython-mpremote/Makefile b/lang/python/micropython-mpremote/Makefile
new file mode 100644 (file)
index 0000000..9beca01
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=micropython-mpremote
+PKG_VERSION:=1.20.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=mpremote
+PKG_HASH:=5c342762a04791309dd49bce63c70a075aa7c548b1c0076262b96f9ccc398ca2
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_BUILD_DEPENDS:=python-hatchling/host python-hatch-requirements-txt/host python-hatch-vcs/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/micropython-mpremote
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Interacting remotely with MicroPython devices
+  URL:=https://github.com/micropython/micropython
+  DEPENDS:=+python3-light +python3-urllib +python3-pyserial
+endef
+
+define Package/micropython-mpremote/description
+This CLI tool provides an integrated set of utilities to remotely
+interact with and automate a MicroPython device over a serial
+connection.
+endef
+
+$(eval $(call Py3Package,micropython-mpremote))
+$(eval $(call BuildPackage,micropython-mpremote))
+$(eval $(call BuildPackage,micropython-mpremote-src))
diff --git a/lang/python/micropython-mpremote/patches/001-no-importlib_metadata.patch b/lang/python/micropython-mpremote/patches/001-no-importlib_metadata.patch
new file mode 100644 (file)
index 0000000..6f5fc49
--- /dev/null
@@ -0,0 +1,5 @@
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,2 +1 @@
+ pyserial >= 3.3
+-importlib_metadata >= 1.4