aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-11 21:13:44 +0900
committerOphestra <cat@gensokyo.uk>2026-07-11 21:13:44 +0900
commit3a3d8efb1ed82092637a7df5e0106fbc311cd8fd (patch)
treecfdb93ecec8b696d7590f42b864d23ddd1496f74
parentcb8c9e4e688345b4f0bb1857f1e2ea0cb8e57cf8 (diff)
internal/rosa/package/python: early bootstrap variant
This avoids pulling in python's insane dependency tree into the bootstrap path. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/llvm.go17
-rw-r--r--internal/rosa/llvm_test.go2
-rw-r--r--internal/rosa/package/ninja.az2
-rw-r--r--internal/rosa/package/python/package.az70
4 files changed, 81 insertions, 10 deletions
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go
index 40167181..52e14131 100644
--- a/internal/rosa/llvm.go
+++ b/internal/rosa/llvm.go
@@ -17,11 +17,12 @@ var (
_earlyRuntimes = H("early-runtimes")
_musl = H("musl")
- _bash = H("bash")
- _gawk = H("gawk")
- _coreutils = H("coreutils")
- _diffutils = H("diffutils")
- _findutils = H("findutils")
+ _bash = H("bash")
+ _gawk = H("gawk")
+ _pythonEarly = H("python-early")
+ _coreutils = H("coreutils")
+ _diffutils = H("diffutils")
+ _findutils = H("findutils")
_zlib = H("zlib")
_zstd = H("zstd")
@@ -124,7 +125,7 @@ ln -s \
"/work/system/lib/${ROSA_TRIPLE}/crtendS.o"
`,
},
- _python,
+ _pythonEarly,
_muslHeaders,
_kernelHeaders,
@@ -180,7 +181,7 @@ ln -s \
},
SkipTest: true,
},
- _python,
+ _pythonEarly,
_zlib,
_zstd,
@@ -367,7 +368,7 @@ ln -s clang++ /work/system/bin/c++
Test: "ninja " + jobsFlagE + " " + loadFlagE + " check-all",
},
- _python,
+ _pythonEarly,
_perl,
_diffutils,
_bash,
diff --git a/internal/rosa/llvm_test.go b/internal/rosa/llvm_test.go
index 5af4265c..ef81d987 100644
--- a/internal/rosa/llvm_test.go
+++ b/internal/rosa/llvm_test.go
@@ -8,7 +8,7 @@ import (
)
func TestLLVMInputs(t *testing.T) {
- const wantInputCount = 550
+ const wantInputCount = 431
_, llvm := rosa.Native().Std().MustLoad(rosa.H("llvm"))
var n int
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";