internal/rosa/package/python: early bootstrap variant
Test / Create distribution (push) Successful in 2m10s
Test / Sandbox (push) Successful in 6m44s
Test / ShareFS (push) Successful in 8m36s
Test / Sandbox (race detector) (push) Successful in 9m22s
Test / Hakurei (race detector) (push) Successful in 11m28s
Test / Hakurei (push) Successful in 2m25s
Test / Flake checks (push) Successful in 1m13s

This avoids pulling in python's insane dependency tree into the bootstrap path.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-07-11 21:13:44 +09:00
parent cb8c9e4e68
commit 3a3d8efb1e
4 changed files with 81 additions and 10 deletions
+4 -3
View File
@@ -19,6 +19,7 @@ var (
_bash = H("bash") _bash = H("bash")
_gawk = H("gawk") _gawk = H("gawk")
_pythonEarly = H("python-early")
_coreutils = H("coreutils") _coreutils = H("coreutils")
_diffutils = H("diffutils") _diffutils = H("diffutils")
_findutils = H("findutils") _findutils = H("findutils")
@@ -124,7 +125,7 @@ ln -s \
"/work/system/lib/${ROSA_TRIPLE}/crtendS.o" "/work/system/lib/${ROSA_TRIPLE}/crtendS.o"
`, `,
}, },
_python, _pythonEarly,
_muslHeaders, _muslHeaders,
_kernelHeaders, _kernelHeaders,
@@ -180,7 +181,7 @@ ln -s \
}, },
SkipTest: true, SkipTest: true,
}, },
_python, _pythonEarly,
_zlib, _zlib,
_zstd, _zstd,
@@ -367,7 +368,7 @@ ln -s clang++ /work/system/bin/c++
Test: "ninja " + jobsFlagE + " " + loadFlagE + " check-all", Test: "ninja " + jobsFlagE + " " + loadFlagE + " check-all",
}, },
_python, _pythonEarly,
_perl, _perl,
_diffutils, _diffutils,
_bash, _bash,
+1 -1
View File
@@ -8,7 +8,7 @@ import (
) )
func TestLLVMInputs(t *testing.T) { func TestLLVMInputs(t *testing.T) {
const wantInputCount = 550 const wantInputCount = 431
_, llvm := rosa.Native().Std().MustLoad(rosa.H("llvm")) _, llvm := rosa.Native().Std().MustLoad(rosa.H("llvm"))
var n int var n int
+1 -1
View File
@@ -34,7 +34,7 @@ cp ninja /work/system/bin/`;
}; };
inputs = [ inputs = [
python, python-early,
bash, bash,
]; ];
} }
+70
View File
@@ -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 { package python-setuptools {
description = "the autotools of the Python ecosystem"; description = "the autotools of the Python ecosystem";
website = "https://pypi.org/project/setuptools"; website = "https://pypi.org/project/setuptools";