diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-19 00:03:42 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-19 00:44:24 +0900 |
| commit | 8807cbc7305e424725b2be8eed7ecd9234f7772e (patch) | |
| tree | 5998f055396505becf0f99fcba3c86514f00650b /internal/rosa/python.go | |
| parent | 0e95573f187f64de1a46f27af67325e57037b9a9 (diff) | |
internal/rosa: create metadata alongside artifact
This enables deferring evaluation of azalea-based packages and fixes the longstanding quirk of version being disjoint from other metadata.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/python.go')
| -rw-r--r-- | internal/rosa/python.go | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go index 93fe0d70..a9ec642a 100644 --- a/internal/rosa/python.go +++ b/internal/rosa/python.go @@ -88,9 +88,7 @@ index 19aea290b58..51603ba9510 100644 ), version } func init() { - native.MustRegister(&Artifact{ - f: Toolchain.newPython, - + native.mustRegister(Toolchain.newPython, &Metadata{ Name: "python", Description: "the Python programming language interpreter", Website: "https://www.python.org/", @@ -200,15 +198,13 @@ func (s *S) newPythonPackage( build P, extra ...ArtifactH, ) { name = "python-" + name - s.MustRegister(&Artifact{ - f: func(t Toolchain) (pkg.Artifact, string) { - return t.NewPackage(name, version, source, attrP, attr, slices.Concat( - P{Python}, - extra, - build, - )...), version - }, - + s.mustRegister(func(t Toolchain) (pkg.Artifact, string) { + return t.NewPackage(name, version, source, attrP, attr, slices.Concat( + P{Python}, + extra, + build, + )...), version + }, &Metadata{ Name: name, Description: description, Website: website, @@ -352,18 +348,16 @@ func init() { } func init() { - native.MustRegister(&Artifact{ - f: func(t Toolchain) (pkg.Artifact, string) { - source, version := t.Load(llvmSource) - return t.NewPackage("lit", version, source, nil, &PipHelper{ - Append: []string{"llvm", "utils", "lit"}, - // already checked during llvm - SkipCheck: true, - }, - PythonSetuptools, - ), version + native.mustRegister(func(t Toolchain) (pkg.Artifact, string) { + meta, source := t.Load(llvmSource) + return t.NewPackage("lit", meta.Version, source, nil, &PipHelper{ + Append: []string{"llvm", "utils", "lit"}, + // already checked during llvm + SkipCheck: true, }, - + PythonSetuptools, + ), meta.Version + }, &Metadata{ Name: "lit", Description: "a portable tool for executing LLVM and Clang style test suites", Website: "https://llvm.org/docs/CommandGuide/lit.html", |
