diff options
author | Jeffery To <jeffery.to@gmail.com> | 2023-05-30 03:24:54 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2023-06-02 21:39:58 +0800 |
commit | 9390bd0262ad9f0775b76984d1c8f29b9a35584e (patch) | |
tree | 138b1e3a2e246b38e2d89abfbe209b79735790a9 /lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch | |
parent | a4ae38494f0c12799b343eb521ca13123c0bb4e3 (diff) |
micropython-lib: Update to master, split target package
The package has been reworked to install the same files that are
available to be downloaded/installed by mip, the package manager new to
MicroPython 1.20.0.
This also splits the original target package into four:
* micropython-lib
* Includes packages common to all MicroPython ports (python-stdlib,
python-ecosys, micropython)
* Contains mpy bytecode files
* micropython-lib-src
* Includes packages common to all MicroPython ports (python-stdlib,
python-ecosys, micropython)
* Contains py source files
* micropython-lib-unix
* Includes packages specific to the MicroPython Unix port (unix-ffi)
* Contains mpy bytecode files
* Installs a specific launcher (micropython-unix) that adds the Unix
package directory into MicroPython's library path
* micropython-lib-unix-src
* Includes packages specific to the MicroPython Unix port (unix-ffi)
* Contains py source files
This also updates the package license, title, and description.
Patches:
* 001-build-unix-ffi.patch
This enables the repo build script to also build the Unix-specific
packages. Not sure if upstream is open to accepting this since the
Unix-specific packages don't fit well into the existing package
distribution mechanism.
* 002-add-unix-ffi-os-path.patch and 003-add-unix-ffi-uu.patch
These fix instances where the unix-ffi version of the os package is
overridden by the python-stdlib version. These have been submitted to
upstream: https://github.com/micropython/micropython-lib/pull/672
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch')
-rw-r--r-- | lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch b/lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch new file mode 100644 index 000000000..5ebc6820e --- /dev/null +++ b/lang/python/micropython-lib/patches/002-add-unix-ffi-os-path.patch @@ -0,0 +1,53 @@ +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) |