diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-19 20:26:41 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-19 20:26:41 +0900 |
| commit | 3b7b6e51fb2a7fbdd825ae56ce6b74e416cf9347 (patch) | |
| tree | 159e6c779b66289556c6778257282bac1cd35032 | |
| parent | b1b4debb827a55e2034cee2504fa95894c96c75b (diff) | |
internal/rosa/python: pass build dependencies separately
This is cleaner with less duplicate code.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/python.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go index e0aaaaab..7eefb8e4 100644 --- a/internal/rosa/python.go +++ b/internal/rosa/python.go @@ -169,22 +169,23 @@ pip3 install \ func newPythonPackage( name string, id int, description, website, version string, source pkg.Artifact, attrP *PackageAttr, attr *PipHelper, - dependencies P, extra ...PArtifact, + build P, extra ...PArtifact, ) Metadata { name = "python-" + name - if dependencies == nil { - dependencies = slices.Concat(P{Python}, extra) - } return Metadata{ f: func(t Toolchain) (pkg.Artifact, string) { - return t.NewPackage(name, version, source, attrP, attr, extra...), version + return t.NewPackage(name, version, source, attrP, attr, slices.Concat( + P{Python}, + extra, + build, + )...), version }, Name: name, Description: description, Website: website, - Dependencies: dependencies, + Dependencies: slices.Concat(P{Python}, extra), ID: id, } @@ -285,8 +286,7 @@ func init() { version, newFromGitHub( "cpburnz/python-pathspec", "v"+version, checksum, - ), nil, nil, nil, - PythonFlitCore, + ), nil, nil, P{PythonFlitCore}, ) } |
