PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
-PKG_SOURCE_VERSION:=d8e163bb5f3ef45e71e145c27bc4f207beaad70f
-PKG_SOURCE_DATE:=20231031
-PKG_MIRROR_HASH:=311651a719ae645d3e40c3c8ebf706fa2e964ac1455d84bee73606ec6d7c13a2
+PKG_SOURCE_VERSION:=50ed36fbeb919753bcc26ce13a8cffd7691d06ef
+PKG_SOURCE_DATE:=20240525
+PKG_MIRROR_HASH:=c03c4226c461079d529b72456569797d3f87f0970e78d1c7c4d6c34d32586af4
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=MIT Python-2.0.1
import manifestfile
import mpy_cross
-@@ -310,7 +310,7 @@ def build(output_path, hash_prefix_len,
+@@ -310,7 +310,10 @@ def build(output_path, hash_prefix_len,
# For now, don't process unix-ffi. In the future this can be extended to
# allow a way to request unix-ffi packages via mip.
- lib_dirs = ["micropython", "python-stdlib", "python-ecosys"]
+ lib_dirs = ["unix-ffi"] if unix_ffi else ["micropython", "python-stdlib", "python-ecosys"]
++
++ if unix_ffi:
++ manifestfile.BASE_LIBRARY_NAMES = ("unix-ffi",) + manifestfile.BASE_LIBRARY_NAMES
mpy_version, _mpy_sub_version = mpy_cross.mpy_version(mpy_cross=mpy_cross_path)
mpy_version = str(mpy_version)
-@@ -438,6 +438,7 @@ def main():
+@@ -438,6 +441,7 @@ def main():
cmd_parser = argparse.ArgumentParser(description="Compile micropython-lib for serving to mip.")
cmd_parser.add_argument("--output", required=True, help="output directory")
cmd_parser.add_argument("--hash-prefix", default=8, type=int, help="hash prefix length")
cmd_parser.add_argument("--mpy-cross", default=None, help="optional path to mpy-cross binary")
cmd_parser.add_argument("--micropython", default=None, help="path to micropython repo")
-@@ -447,7 +448,7 @@ def main():
+@@ -447,7 +451,7 @@ def main():
sys.path.append(os.path.join(args.micropython, "tools")) # for manifestfile
sys.path.append(os.path.join(args.micropython, "mpy-cross")) # for mpy_cross
+++ /dev/null
-From dcce62dd525cf0f8e572e56a8990aea7ec2f0ade Mon Sep 17 00:00:00 2001
-From: Jeffery To <jeffery.to@gmail.com>
-Date: Tue, 30 May 2023 23:47:59 +0800
-Subject: [PATCH] unix-ffi/os-path: Add unix-ffi version of `os-path` package.
-
-This package reuses the code from the python-stdlib version of `os-path`
-but requires the unix-ffi version of `os`.
-
-This also updates `glob` to require this version of `os-path`.
-
-Signed-off-by: Jeffery To <jeffery.to@gmail.com>
----
- unix-ffi/glob/manifest.py | 2 +-
- unix-ffi/os-path/manifest.py | 6 ++++++
- unix-ffi/os/os/__init__.py | 6 ++++++
- 3 files changed, 13 insertions(+), 1 deletion(-)
- create mode 100644 unix-ffi/os-path/manifest.py
-
---- a/unix-ffi/glob/manifest.py
-+++ b/unix-ffi/glob/manifest.py
-@@ -1,7 +1,7 @@
- metadata(version="0.5.2")
-
- require("os", unix_ffi=True)
--require("os-path")
-+require("os-path", unix_ffi=True)
- require("re", unix_ffi=True)
- require("fnmatch")
-
---- /dev/null
-+++ b/unix-ffi/os-path/manifest.py
-@@ -0,0 +1,6 @@
-+metadata(version="0.1.4")
-+
-+# Originally written by Paul Sokolovsky.
-+
-+require("os", unix_ffi=True)
-+package("os", base_path="../../python-stdlib/os-path")
---- a/unix-ffi/os/os/__init__.py
-+++ b/unix-ffi/os/os/__init__.py
-@@ -5,6 +5,12 @@ import stat as stat_
- import ffilib
- import uos
-
-+# Provide optional dependencies (which may be installed separately).
-+try:
-+ from . import path
-+except ImportError:
-+ pass
-+
- R_OK = const(4)
- W_OK = const(2)
- X_OK = const(1)
+++ /dev/null
-From 2e7bfd08a306bd9e80b22097ef8fe66e1dd85054 Mon Sep 17 00:00:00 2001
-From: Jeffery To <jeffery.to@gmail.com>
-Date: Wed, 31 May 2023 00:00:11 +0800
-Subject: [PATCH] unix-ffi/uu: Add unix-ffi version of `uu` package.
-
-This package reuses the code from the python-stdlib version of `uu` but
-requires the unix-ffi version of `os-path`.
-
-This also updates `email.message` to require this version of `uu`.
-
-Signed-off-by: Jeffery To <jeffery.to@gmail.com>
----
- unix-ffi/email.message/manifest.py | 2 +-
- unix-ffi/uu/manifest.py | 6 ++++++
- 2 files changed, 7 insertions(+), 1 deletion(-)
- create mode 100644 unix-ffi/uu/manifest.py
-
---- a/unix-ffi/email.message/manifest.py
-+++ b/unix-ffi/email.message/manifest.py
-@@ -1,7 +1,7 @@
- metadata(version="0.5.3")
-
- require("re", unix_ffi=True)
--require("uu")
-+require("uu", unix_ffi=True)
- require("base64")
- require("binascii")
- require("email.utils", unix_ffi=True)
---- /dev/null
-+++ b/unix-ffi/uu/manifest.py
-@@ -0,0 +1,6 @@
-+metadata(version="0.5.1")
-+
-+require("binascii")
-+require("os-path", unix_ffi=True)
-+
-+module("uu.py", base_path="../../python-stdlib/uu")