# The Python image's stdlib subset (RFC 017 ยง8.1 R2; E56's research/e56-python-package/drop.txt), the # jlink analogue of D8, applied by guest/base/rootfs/mkroot.sh MODE=python. # "pkg NAME" โ€” the whole package payload is not installed (`guest lock-apk --image python` leaves it # out of apk.lock unless a "keep" line needs a file of it). # "path GLOB" โ€” removed from the installed tree (relative to /; P = usr/lib/python3.14, # D = P/lib-dynload, S = .cpython-314-riscv64-linux-musl.so). A removed X.py also loses # __pycache__/X.cpython-314*.pyc. # "keep GLOB" โ€” re-added from the package payload after the pkg lines (a library out of a # package whose other files are dropped). # # Networking and TLS: the guest has no network (D10). hashlib keeps md5/sha1/sha2/sha3/blake2/hmac # through CPython's built-in HACL* modules (_md5, _sha1, _sha2, _sha3, _blake2, _hmac). pkg libssl3 pkg libcrypto3 path P/ssl.py path D/_ssl.S path D/_hashlib.S # SQLite: not in a beginner course (RQ: an intermediate course could add it back, +1.3 MB raw). pkg sqlite-libs path P/sqlite3 path D/_sqlite3.S path P/dbm/sqlite3.py # GNU dbm, curses, readline (GPL-3.0 readline/gdbm; PyREPL in 3.13+ needs neither: it has its # own line editor and, since 3.14, a pure-Python terminfo reader, _pyrepl/terminfo.py). pkg gdbm pkg readline pkg libncursesw pkg libpanelw pkg ncurses-terminfo-base path D/_dbm.S path D/_gdbm.S path D/readline.S path D/_curses.S path D/_curses_panel.S path P/curses # mpdecimal ships libmpdec and libmpdec++ in one package; only libmpdec.so.4 is needed by _decimal, # libmpdec++ is what pulls libstdc++ and libgcc (2.6 MB). pkg mpdecimal pkg libstdc++ pkg libgcc keep mpdecimal usr/lib/libmpdec.so.4* # Packaging and installers: no pip, no network, no venvs. path P/ensurepip path P/venv # GUI: no Tk in the guest (python3-tkinter is a separate package; turtle needs it). path P/turtle.py path P/turtledemo path P/idlelib path P/tkinter # help('topics') / help('keywords') text (help(obj) still works through pydoc). path P/pydoc_data # CPython's own C-API test modules and examples, the remote debugger attach (3.14). path D/_test*.S path D/_ctypes_test.S path D/_xxtestfuzz.S path D/xxlimited*.S path D/xxsubtype.S path D/_remote_debugging.S path P/__phello__ # CJK multibyte codecs (UTF-8 and the single-byte codecs stay). path D/_codecs_*.S path D/_multibytecodec.S # Mail, RPC and server leaf modules nothing else in the stdlib imports (email, http, urllib stay: # importlib.metadata and pathlib use them). path P/xmlrpc path P/wsgiref path P/mailbox.py path P/imaplib.py path P/smtplib.py path P/ftplib.py path P/poplib.py # Build-time files: headers, the static config dir, pkg-config. path usr/include path P/config-3.14-* path usr/lib/pkgconfig