1DOLLY 72PACKAGE python3REQUIRES HOST runtime@04REQUIRES HOST dso@05REQUIRES HOST http@06REQUIRES HOST sockets@078FROM /v0.1.2/Dollyfile-system cb003619fa38f3340386739e0df6a500c95f5ff040b1efb6804461adf294b2599# Build the Python runtime and native extension SDK; pip.dm adds pip.10REQUIRES HEADER curl11REQUIRES HEADER dso12REQUIRES HEADER libc13REQUIRES HEADER runtime14REQUIRES HEADER zlib15REQUIRES LIB    curl16REQUIRES LIB    z17REQUIRES TOOL   ar18REQUIRES TOOL   cc19REQUIRES TOOL   c++20REQUIRES TOOL   cp21REQUIRES TOOL   make22REQUIRES TOOL   mkdir23REQUIRES TOOL   mv24REQUIRES TOOL   rm25REQUIRES TOOL   tar26REQUIRES TOOL   test27REQUIRES TOOL   touch2829SOURCE /v0.1.2/dist/static/python/libffi.tar f1edc3a00490ab6d673adb1202b0d779fdbff33bd28ab8382e39847e64109bce /tmp/libffi.tar30SLOP tar \31  -xf /tmp/libffi.tar \32  -C /3334SOURCE /v0.1.2/dist/static/python/runtimes/libffi-dolly.c d5a180a210d829268b9686620fbfa2e5a5e439a2b0fe46ca55b12555f4b6f0d8 /usr/src/libffi/src/dolly.c3536FILE /tmp/libffi/Makefile37    .RECIPEPREFIX := >38    CC := cc39    AR := ar40    ROOT := /usr/src/libffi41    CFLAGS := -O1 -std=c17 -DHAVE_CONFIG_H -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/src42    NAMES := prep_cif types raw_api java_raw_api tramp dolly43    OBJECTS := $(addprefix /tmp/libffi/,$(addsuffix .o,$(NAMES)))44    all: /usr/lib/libffi.a45    /tmp/libffi/%.o: $(ROOT)/src/%.c46    >$(CC) $(CFLAGS) -c $< -o $@47    /usr/lib/libffi.a: $(OBJECTS)48    >$(AR) rcs $@ $^49SLOP make \50  -f /tmp/libffi/Makefile5152FILE /tmp/libffi-check.c53    #include <ffi.h>54    #include <stdio.h>55    static int add(int left, int right) { return left + right; }56    static void add_closure(ffi_cif *cif, void *result, void **arguments,57                            void *context) {58      (void)cif;59      *(int *)result = *(int *)arguments[0] + *(int *)context;60    }61    int main(void) {62      ffi_cif cif;63      ffi_type *types[] = {&ffi_type_sint32, &ffi_type_sint32};64      int left = 19, right = 23, answer = 0;65      void *values[] = {&left, &right};66      if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2,67                       &ffi_type_sint32, types) != FFI_OK) return 10;68      ffi_call(&cif, FFI_FN(add), &answer, values);69      if (answer != 42) return 11;70      void *code = 0;71      ffi_closure *closure = ffi_closure_alloc(sizeof(*closure), &code);72      ffi_type *one_type[] = {&ffi_type_sint32};73      if (closure == 0 ||74          ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,75                       &ffi_type_sint32, one_type) != FFI_OK ||76          ffi_prep_closure_loc(closure, &cif, add_closure, &right, code) != FFI_OK) {77        return 12;78      }79      int (*callback)(int) = code;80      answer = callback(19);81      ffi_closure_free(closure);82      if (answer != 42) return 13;83      return puts("LIBFFI-WASM64-OK") < 0 ? 14 : 0;84    }85SLOP cc \86  -O1 \87  -std=c17 \88  /tmp/libffi-check.c \89  -o /tmp/libffi-check \90  -lffi91SLOP slop \92  -c \93  /tmp/libffi-check9495EXPORTS LIB    ffi       /usr/lib/libffi.a96EXPORTS HEADER ffi       /usr/include/ffi.h97EXPORTS HEADER ffitarget /usr/include/ffitarget.h98FILE /usr/share/licenses/libffi/LICENSE99100SLOP rm \101  -rf \102  /tmp/libffi \103  /tmp/libffi-check \104  /tmp/libffi-check.c \105  /tmp/libffi.tar \106  /usr/src/libffi107REQUIRES HEADER http108REQUIRES HEADER ffi109REQUIRES HEADER ffitarget110REQUIRES LIB    ffi111REQUIRES TOOL   gzip112113# Upstream Make runs the new interpreter before installing Lib. Do not retain114# timestamped bytecode caches from that build in the immutable image.115EXPORTS ENV PYTHONDONTWRITEBYTECODE 1116117# The target is configured outside the browser, but every target object and118# executable is compiled here. Dolly-owned adapters remain independent pinned119# inputs instead of being hidden inside the upstream archive.120SOURCE /v0.1.2/dist/static/python/cpython.tar.gz d379c7b2c1687130126c2da3b3b8de372ee34c8689ff214d42339f0c23a332bf /tmp/cpython.tar.gz121122SLOP gzip -dc /tmp/cpython.tar.gz | tar -xf - -C /123124SOURCE /v0.1.2/dist/static/python/runtimes/cpython-platform.c        20c5c120f835ce94ceb9be08cc25c4623ae333d844b2d3c3098ffed36f3b41eb /usr/src/python/Python/dolly_platform.c125SOURCE /v0.1.2/dist/static/python/runtimes/cpython-extension-check.c 1763ec04e582beee6066af81c93fe20e8cf0d83ae7d41d935b395c5cb3cdf071 /usr/src/python/Modules/dolly_extension_check.c126SOURCE /v0.1.2/dist/static/python/runtimes/cpython-socket-stubs.c    2aebdbdf3722dfa79f7b7eeb178b4beae2894a3d35ef12501054fb667342b335 /usr/src/python/Modules/dolly_socket_stubs.c127SOURCE /v0.1.2/dist/static/python/runtimes/cpython-http.c 13610f3322a4d09aa558e5d31523a082303835bf7c5981557c09443562cdc2da /usr/src/python/Modules/dolly_http.c128SOURCE /v0.1.2/dist/static/python/runtimes/cpython-transport.py 4567a855ff8459f6671c770dd69d93c84870bef3acd272f11ca28a394c9be92d /usr/src/python/Lib/_dolly_transport.py129SOURCE /v0.1.2/dist/static/python/runtimes/cpython-process.c         9dfbbe0c2de367d829b4fec488ff4e17488324c4cc4c750b34de2c82547fb943 /usr/src/python/Modules/dolly_process.c130SOURCE /v0.1.2/dist/static/python/runtimes/cpython-subprocess.py     cabc2b4eb15e61332c2b63454724c3b390c5f2a2f0effa2889861e123835b785 /usr/src/python/Lib/_dolly_subprocess.py131132SLOP CWD /usr/src/python touch \133  Python/frozen_modules/*.h134135# The embedded LLVM optimizer spends minutes on a small measured set of136# translation units. Compile only those outliers at -O0 and let upstream Make137# preserve the prepared objects; the rest of CPython is substantially faster138# at -O2.139SLOP CWD /usr/src/python cc \140  -c \141  -O0 \142  -std=c11 \143  -fno-builtin \144  -fno-strict-aliasing \145  -IInclude/internal \146  -IInclude/internal/mimalloc \147  -IObjects \148  -IInclude \149  -IPython \150  -I. \151  -DPy_BUILD_CORE \152  Python/tracemalloc.c \153  -o Python/tracemalloc.o154SLOP CWD /usr/src/python cc \155  -c \156  -O0 \157  -std=c11 \158  -fno-builtin \159  -fno-strict-aliasing \160  -IInclude/internal \161  -IInclude/internal/mimalloc \162  -IObjects \163  -IInclude \164  -IPython \165  -I. \166  -DPy_BUILD_CORE \167  Modules/arraymodule.c \168  -o Modules/arraymodule.o169SLOP CWD /usr/src/python cc \170  -c \171  -O0 \172  -std=c11 \173  -IInclude/internal \174  -IInclude/internal/mimalloc \175  -IObjects \176  -IInclude \177  -IPython \178  -I. \179  -DPy_BUILD_CORE \180  Python/dolly_platform.c \181  -o Python/dolly_platform.o182SLOP CWD /usr/src/python cc \183  -c \184  -O0 \185  -std=c11 \186  -IInclude/internal \187  -IInclude/internal/mimalloc \188  -IObjects \189  -IInclude \190  -IPython \191  -I. \192  -DPy_BUILD_CORE \193  -DDATE='"Jan 01 1970"' \194  -DTIME='"00:00:00"' \195  Modules/getbuildinfo.c \196  -o Modules/getbuildinfo.o197SLOP CWD /usr/src/python cc \198  -c \199  -O0 \200  -std=c11 \201  -IInclude/internal \202  -IInclude/internal/mimalloc \203  -IObjects \204  -IInclude \205  -IPython \206  -I. \207  -DPy_BUILD_CORE \208  -DPLATFORM='"dolly"' \209  Python/getplatform.c \210  -o Python/getplatform.o211SLOP CWD /usr/src/python cc \212  -c \213  -O0 \214  -std=c11 \215  -IInclude/internal \216  -IInclude/internal/mimalloc \217  -IObjects \218  -IInclude \219  -IPython \220  -I. \221  -DPy_BUILD_CORE \222  -DABIFLAGS='""' \223  -DMULTIARCH='"dolly_0_wasm64"' \224  Python/sysmodule.c \225  -o Python/sysmodule.o226SLOP CWD /usr/src/python cc \227  -c \228  -O0 \229  -std=c17 \230  Modules/dolly_socket_stubs.c \231  -o Modules/dolly_socket_stubs.o232SLOP CWD /usr/src/python make \233  -o configure \234  -o config.status \235  -o Makefile.pre \236  -o Makefile \237  -o Modules/config.c \238  -o Modules/getbuildinfo.o \239  -o Python/getplatform.o \240  -o Python/sysmodule.o \241  -o Python/tracemalloc.o \242  -o Modules/arraymodule.o \243  python \244  libpython3.14.a \245  SHELL=/bin/slop \246  CC=cc \247  LINKCC=cc \248  AR=ar \249  BLDSHARED=cc\ -shared \250  INSTSONAME=libpython3.14.a \251  DYNLOADFILE=dynload_shlib.o \252  PY_CFLAGS=-O2\ -std=c11\ -fno-builtin\ -fno-strict-aliasing \253  PY_CFLAGS_NODIST= \254  PY_CPPFLAGS=-IInclude/internal\ -IInclude/internal/mimalloc\ -IObjects\ -IInclude\ -IPython\ -I. \255  CFLAGSFORSHARED= \256  PY_CORE_LDFLAGS= \257  LDFLAGS= \258  LINKFORSHARED=-rdynamic \259  MODULE_MATH_LDFLAGS= \260  MODULE_CMATH_LDFLAGS= \261  MODULE__STATISTICS_LDFLAGS= \262  MODULE__DATETIME_LDFLAGS= \263  MODULE_PYEXPAT_LDFLAGS=Modules/expat/libexpat.a \264  MODULE__SOCKET_CFLAGS=-Dfreeaddrinfo=dolly_py_freeaddrinfo\ -Dgai_strerror=dolly_py_gai_strerror\ -Dgetaddrinfo=dolly_py_getaddrinfo\ -Dgethostbyaddr=dolly_py_gethostbyaddr\ -Dgethostname=dolly_py_gethostname\ -Dgetnameinfo=dolly_py_getnameinfo\ -Dgetprotobyname=dolly_py_getprotobyname\ -Dgetservbyport=dolly_py_getservbyport\ -Dhtonl=dolly_py_htonl\ -Dif_freenameindex=dolly_py_if_freenameindex\ -Dif_indextoname=dolly_py_if_indextoname\ -Dif_nameindex=dolly_py_if_nameindex\ -Dif_nametoindex=dolly_py_if_nametoindex\ -Dinet_aton=dolly_py_inet_aton\ -Dinet_ntop=dolly_py_inet_ntop\ -Dinet_pton=dolly_py_inet_pton\ -Dntohl=dolly_py_ntohl\ -Dpoll=dolly_py_poll \265  MODULE_BINASCII_CFLAGS=-DUSE_ZLIB_CRC32 \266  MODULE_BINASCII_LDFLAGS=-lz \267  MODULE_ZLIB_CFLAGS= \268  MODULE_ZLIB_LDFLAGS=-lz \269  MODULE__CTYPES_CFLAGS=-DHAVE_FFI_PREP_CIF_VAR\ -DHAVE_FFI_PREP_CLOSURE_LOC\ -DHAVE_FFI_CLOSURE_ALLOC \270  MODULE__CTYPES_LDFLAGS=-lffi \271  LIBS=-ldolly-sockets \272  SYSLIBS= \273  LIBM= \274  LIBC= \275  SHLIBS= \276  MACHDEP_OBJS=Python/dolly_platform.o\ Modules/dolly_socket_stubs.o \277  DTRACE=278279# Install the standard-library contents into their final prefix.  Treat the280# destination as an installation directory explicitly: it may already exist281# in a composed image, and `mv SOURCE DESTINATION` would then create a nested282# `Lib` directory instead of the sys.path layout CPython requires.283SLOP mkdir \284  -p \285  /usr/lib/python3.14 \286  /usr/lib/python3.14/lib-dynload287SLOP cp \288  -R \289  /usr/src/python/Lib/. \290  /usr/lib/python3.14291SLOP test \292  -f \293  /usr/lib/python3.14/encodings/__init__.py294SLOP cp \295  /usr/src/python/libpython3.14.a \296  /usr/lib/libpython3.14.a297SLOP mv \298  /usr/src/python/python \299  /usr/bin/python300SLOP ln -sf python /usr/bin/python3301SLOP mkdir \302  -p \303  /usr/include/python3.14304SLOP cp \305  -R \306  /usr/src/python/Include/. \307  /usr/include/python3.14308SLOP cp \309  /usr/src/python/pyconfig.h \310  /usr/include/python3.14/pyconfig.h311SLOP CWD /usr/src/python slop \312  -c \313  'export _PYTHON_PROJECT_BASE=/usr/src/python; python -m sysconfig --generate-posix-vars'314SLOP cp \315  /usr/src/python/build/lib.dolly_0-wasm64-3.14/_sysconfigdata__dolly_dolly_0_wasm64.py \316  /usr/lib/python3.14/_sysconfigdata__dolly_dolly_0_wasm64.py317SLOP mkdir \318  -p \319  /usr/lib/python3.14/config-3.14-dolly_0_wasm64320SLOP cp \321  /usr/src/python/Makefile \322  /usr/lib/python3.14/config-3.14-dolly_0_wasm64/Makefile323SLOP cc \324  -shared \325  -O0 \326  -std=c17 \327  -I/usr/include/python3.14 \328  /usr/src/python/Modules/dolly_extension_check.c \329  -o /usr/lib/python3.14/lib-dynload/dolly_extension_check.cpython-314-dolly_0_wasm64.so330331EXPORTS TOOL   python332EXPORTS TOOL   python3333EXPORTS ENV    PYTHONUTF8 1334EXPORTS LIB    python     /usr/lib/libpython3.14.a335EXPORTS HEADER python     /usr/include/python3.14336337SLOP python \338  --version339SLOP python \340  -c 'import pathlib; p = pathlib.Path("/tmp/python-check.txt"); p.write_text("PYTHON-WASM64"); assert p.read_text() == "PYTHON-WASM64"'341SLOP python \342  -c 'import dolly_extension_check; assert dolly_extension_check.answer() == 42'343SLOP python \344  -c 'import mmap, pathlib; p = pathlib.Path("/tmp/mmap-check"); p.write_bytes(b"DOLLY"); f = p.open("rb"); m = mmap.mmap(f.fileno(), 5, access=mmap.ACCESS_READ); assert m[:] == b"DOLLY"; m.madvise(mmap.MADV_SEQUENTIAL); m.close(); f.close()'345SLOP python \346  -c 'import sysconfig; assert sysconfig.get_platform() == "dolly_0-wasm64"; assert sysconfig.get_config_var("EXT_SUFFIX") == ".cpython-314-dolly_0_wasm64.so"'347SLOP python \348  -c 'import os, subprocess; assert subprocess.check_output(["echo", "spawn-ok"], text=True).strip() == "spawn-ok"; assert subprocess.check_output(["python", "-c", "print(6 * 7)"], text=True).strip() == "42"; child_env = dict(os.environ, DOLLY_CHILD_ENV="explicit"); assert subprocess.check_output(["python", "-c", "import os; print(os.environ[\"DOLLY_CHILD_ENV\"])"] , env=child_env, text=True, timeout=1).strip() == "explicit"'349SLOP python \350  -c 'import threading; seen = []; worker = threading.Thread(target=seen.append, args=(42,)); worker.start(); worker.join(); assert seen == [42] and not worker.is_alive()'351SLOP python \352  -c 'import hashlib; assert hashlib.md5(b"abc", usedforsecurity=False).hexdigest() == "900150983cd24fb0d6963f7d28e17f72"'353SLOP python \354  -c 'import ctypes; libc = ctypes.CDLL(None); libc.strlen.argtypes = [ctypes.c_char_p]; libc.strlen.restype = ctypes.c_size_t; assert libc.strlen(b"dolly") == 5; callback_type = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int); callback = callback_type(lambda value: value + 1); assert callback(41) == 42'355SLOP python \356  -c 'import locale, sys; assert sys.flags.utf8_mode == 1; assert locale.getpreferredencoding(False).lower() == "utf-8"; assert sys.getfilesystemencoding().lower() == "utf-8"'357SLOP python \358  -c 'from pathlib import Path; p = Path("/tmp/python-header-check/check.cpp"); p.parent.mkdir(); p.write_text("#include <Python.h>\nint python_header_check = 42;\n", encoding="utf-8")'359SLOP c++ \360  -c \361  -std=c++17 \362  -I/usr/include/python3.14 \363  /tmp/python-header-check/check.cpp \364  -o /tmp/python-header-check/check.o365SLOP python \366  -c 'import os, sys, termios, tty; assert not os.isatty(0); assert sys.stdin.buffer.read(1) == b""'367368FILE /usr/share/licenses/cpython/LICENSE369# The PSF License Agreement asks derivatives to summarize their changes.370FILE /usr/share/licenses/cpython/DOLLY-CHANGES371    Dolly's changes to CPython: cpython-dolly.patch ports posixmodule, getpath,372    faulthandler, the thread stubs, subprocess, threading, site, platform,373    sysconfig, uuid, ctypes.util and the pager to sys.platform "dolly", where374    processes use Dolly's spawn and wait, there is no fork and thread targets375    run serially. Built-in modules added by Dolly carry HTTP through the376    browser's broker (_dolly_http, _dolly_transport), fail name resolution377    and ssl explicitly, and run libffi over process-local calls. The patched source is378    published beside this image as dist/static/python/cpython.tar.gz.379EXPORTS FOLDER python-stdlib /usr/lib/python3.14380381SLOP rm \382  -rf \383  /tmp/cpython.tar.gz \384  /tmp/mmap-check \385  /tmp/python \386  /tmp/python-header-check \387  /tmp/python-check.txt \388  /usr/lib/python3.14/test \389  /usr/src/python390REQUIRES TOOL python391392# CPython's bundled pip, installed offline without build-time bytecode.393SLOP python \394  /usr/lib/python3.14/ensurepip/_bundled/pip-26.2.1-py3-none-any.whl/pip \395  install \396  --no-compile \397  --no-index \398  --disable-pip-version-check \399  --root-user-action=ignore \400  /usr/lib/python3.14/ensurepip/_bundled/pip-26.2.1-py3-none-any.whl401FOLDER /usr/lib/python3.14/site-packages402EXPORTS TOOL pip403EXPORTS TOOL pip3404405# The browser policy decides which indexes are reachable; skip pip's own406# PyPI version check. Dolly has one user, uid 0. Progress bars refresh from a407# thread, which would never yield under Dolly's serial threading. Meson's debug408# build keeps sdists such as NumPy (which adds -O3 otherwise) and Pandas within409# the compiler budget; pip reads one config setting from this file.410FILE /etc/pip.conf411    [global]412    disable-pip-version-check = true413    root-user-action = ignore414    progress-bar = off415    config-settings = setup-args=-Dbuildtype=debug416417SLOP python \418  -c 'import urllib.request; assert urllib.request.HTTPHandler.__module__ == "_dolly_transport"'419SLOP pip \420  --version421