micropython-lib/unix-ffi
Jim Mussared f3cfc52ab0 unix-ffi: Move more unix-only packages to unix-ffi.
With the dependencies captured in manifest.py, several packages in
python-stdlib were still unix-only due to direct or transitive dependencies
on unix-only or ffi modules.  Or they just make no sense to run on
microcontroller targets.

In a few cases (e.g. base64) where possible, the unix dependency could be
removed.

Updates manifest.py to use the `unix_ffi=True` arg to `require()` for these
libraries.

Rename re-pcre to re now that unix-ffi is effectively its own namespace.

Update unix-ffi/README.md, and strengthen the wording that the unix
libraries are unmaintained.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:42 +10:00
..
_libc all: Replace metadata.txt with manifest.py. 2022-09-05 17:50:28 +10:00
_markupbase unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
argparse unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
cgi unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.charset unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.encoders unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.errors unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.feedparser unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.header unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.internal unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.message unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.parser unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
email.utils unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
fcntl unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
ffilib all: Replace metadata.txt with manifest.py. 2022-09-05 17:50:28 +10:00
getopt unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
gettext unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
glob unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
html.entities unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
html.parser unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
http.client unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
machine unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
multiprocessing unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
os unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
pwd unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
pyb all: Run black over all code. 2021-05-27 15:50:04 +10:00
re unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
select unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
signal unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
socket unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
sqlite3 unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
test.support unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
time unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
timeit unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
tty all: Replace metadata.txt with manifest.py. 2022-09-05 17:50:28 +10:00
ucurses unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
unittest unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
urllib.parse unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00
README.md unix-ffi: Move more unix-only packages to unix-ffi. 2022-09-05 17:50:42 +10:00

README.md

Unix-specific libraries

These are libraries that will only run on the Unix port of MicroPython, or are too big to be used on microcontrollers. There is some limited support for the Windows port too.

Note: This directory is unmaintained.

Background

The libraries in this directory provide additional CPython compatibility using the host operating system's native libraries.

This is implemented either by accessing the libraries directly via libffi, or by using built-in modules that are only available on the Unix port.

In theory, this allows you to use MicroPython as a more complete drop-in replacement for CPython.

Usage

To use a unix-specific library, pass unix_ffi=True to require() in your manifest file.

require("os", unix_ffi=True) # Use the unix-ffi version instead of python-stdlib.