From 3a3d8efb1ed82092637a7df5e0106fbc311cd8fd Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 11 Jul 2026 21:13:44 +0900 Subject: internal/rosa/package/python: early bootstrap variant This avoids pulling in python's insane dependency tree into the bootstrap path. Signed-off-by: Ophestra --- internal/rosa/package/ninja.az | 2 +- internal/rosa/package/python/package.az | 70 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) (limited to 'internal/rosa/package') diff --git a/internal/rosa/package/ninja.az b/internal/rosa/package/ninja.az index cb103656..2c1bd8b3 100644 --- a/internal/rosa/package/ninja.az +++ b/internal/rosa/package/ninja.az @@ -34,7 +34,7 @@ cp ninja /work/system/bin/`; }; inputs = [ - python, + python-early, bash, ]; } diff --git a/internal/rosa/package/python/package.az b/internal/rosa/package/python/package.az index 40c12f74..b10d6cce 100644 --- a/internal/rosa/package/python/package.az +++ b/internal/rosa/package/python/package.az @@ -73,6 +73,76 @@ package python { ]; } +package python-early { + description = "minimal python interpreter exclusive to the bootstrap path"; + website = "https://www.python.org"; + exclude = true; + anitya = 13254; + block = "exclusive to the bootstrap path"; + + version# = "3.14.6"; + source = remoteTar { + url = "https://www.python.org/ftp/python/"+version+ + "/Python-"+version+".tgz"; + checksum = "yynwXnElUvlAweA_RkBKQY35P59Gu5YU6ickJs6Z-blIoHgw5KgKXROY1gq2w0ez"; + compress = gzip; + }; + + // test_synopsis_sourceless assumes this is writable and checks __pycache__ + writable = true; + chmod = true; + + env = [ + "EXTRATESTOPTS=-j0 -x " + join { + elems = [ + // requires internet access (http://www.pythontest.net/) + "test_asyncio", + "test_socket", + "test_urllib2", + "test_urllibnet", + "test_urllib2net", + + // makes assumptions about uid_map/gid_map + "test_os", + "test_subprocess", + + // insane strict_timestamps default + "test_zipfile", + + // requires gcc + "test_ctypes", + + // breaks on llvm + "test_dbm_gnu", + ]; + sep = " -x "; + }, + + // _ctypes appears to infer something from the linker name + "LDFLAGS=-Wl,--dynamic-linker=/system/lib/" + + "ld-musl-" + linuxArch + ".so.1", + ]; + + exec = make { + check = [ "test" ]; + postInstall = "ln -s python3 /work/system/bin/python"; + }; + + inputs = [ + zlib, + bzip2, + libffi, + + kernel-headers, + ]; + + runtime = [ + zlib, + bzip2, + libffi, + ]; +} + package python-setuptools { description = "the autotools of the Python ecosystem"; website = "https://pypi.org/project/setuptools"; -- cgit v1.3.1