aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/python.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-25 01:32:21 +0900
committerOphestra <cat@gensokyo.uk>2026-01-25 01:43:18 +0900
commit20790af71ec9a69a462ecaaa7fc308e3b685383d (patch)
treee7cfdd8fec51c5dc37db88ad887c07dee947b600 /internal/rosa/python.go
parent43b8a40fc0e8d99bf29531d33f1f57d0c6e9df5e (diff)
internal/rosa: lazy initialise all artifacts
This improves performance, though not as drastically as lazy initialising llvm. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/python.go')
-rw-r--r--internal/rosa/python.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go
index 7bb713dc..fd1eca25 100644
--- a/internal/rosa/python.go
+++ b/internal/rosa/python.go
@@ -6,8 +6,7 @@ import (
"hakurei.app/internal/pkg"
)
-// NewPython returns a [pkg.Artifact] containing an installation of Python.
-func (t Toolchain) NewPython() pkg.Artifact {
+func (t Toolchain) newPython() pkg.Artifact {
const (
version = "3.14.2"
checksum = "7nZunVMGj0viB-CnxpcRego2C90X5wFsMTgsoewd5z-KSZY2zLuqaBwG-14zmKys"
@@ -34,9 +33,9 @@ func (t Toolchain) NewPython() pkg.Artifact {
"test_dbm_gnu",
}
return t.New("python-"+version, []pkg.Artifact{
- t.NewMake(),
- t.NewZlib(),
- t.NewLibffi(),
+ t.Load(Make),
+ t.Load(Zlib),
+ t.Load(Libffi),
}, nil, []string{
"EXTRATESTOPTS=-j0 -x " + strings.Join(skipTests, " -x "),
@@ -63,3 +62,4 @@ make DESTDIR=/work install
pkg.TarGzip,
)))
}
+func init() { artifactsF[Python] = Toolchain.newPython }