micropython-lib: update to 1.23.0 and fix compile on external mbedtls3

* update micropython-lib to hash for 1.23.0
* remove micropython-lib unix-uffi patches

Co-authored-by: Jeffery To <jeffery.to@gmail.com>

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
Glenn Strauss
2024-07-25 02:44:12 -04:00
committed by Rosen Penev
parent 76d5db5856
commit 4c751e454c
4 changed files with 9 additions and 96 deletions

View File

@@ -9,16 +9,19 @@
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")
@@ -26,7 +29,7 @@
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

View File

@@ -1,53 +0,0 @@
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)

View File

@@ -1,37 +0,0 @@
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")