aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/python.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-13 12:39:36 +0900
committerOphestra <cat@gensokyo.uk>2026-03-13 13:23:30 +0900
commitb3f0360a05230dde609eb0e3fabf3a5d92792f94 (patch)
treeeafdfd1b13b9de94e2d9c9bf6f19329949eb85d8 /internal/rosa/python.go
parent89389940363143dd32dfa9920eb34850de541472 (diff)
internal/rosa: populate runtime dependencies
This also removes manually resolved indirect dependencies. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/python.go')
-rw-r--r--internal/rosa/python.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go
index a4019534..9ab88b8d 100644
--- a/internal/rosa/python.go
+++ b/internal/rosa/python.go
@@ -53,11 +53,11 @@ func (t Toolchain) newPython() (pkg.Artifact, string) {
Check: []string{"test"},
},
Zlib,
+ Bzip2,
Libffi,
+ OpenSSL,
PkgConfig,
- OpenSSL,
- Bzip2,
XZ,
), version
}
@@ -69,6 +69,13 @@ func init() {
Description: "the Python programming language interpreter",
Website: "https://www.python.org/",
+ Dependencies: P{
+ Zlib,
+ Bzip2,
+ Libffi,
+ OpenSSL,
+ },
+
ID: 13254,
}
}
@@ -81,15 +88,9 @@ func newViaPip(
wname := name + "-" + version + "-" + interpreter + "-" + abi + "-" + platform + ".whl"
return Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
- extraRes := make([]pkg.Artifact, len(extra))
- for i, p := range extra {
- extraRes[i] = t.Load(p)
- }
-
- return t.New(name+"-"+version, 0, slices.Concat([]pkg.Artifact{
- t.Load(Zlib),
- t.Load(Python),
- }, extraRes), nil, nil, `
+ return t.New(name+"-"+version, 0, t.AppendPresets(nil,
+ slices.Concat(P{Python}, extra)...,
+ ), nil, nil, `
pip3 install \
--no-index \
--prefix=/system \
@@ -104,6 +105,8 @@ pip3 install \
Name: "python-" + name,
Description: description,
Website: "https://pypi.org/project/" + name + "/",
+
+ Dependencies: slices.Concat(P{Python}, extra),
}
}
@@ -112,10 +115,9 @@ func (t Toolchain) newSetuptools() (pkg.Artifact, string) {
version = "82.0.0"
checksum = "K9f8Yi7Gg95zjmQsE1LLw9UBb8NglI6EY6pQpdD6DM0Pmc_Td5w2qs1SMngTI6Jp"
)
- return t.New("setuptools-"+version, 0, []pkg.Artifact{
- t.Load(Zlib),
- t.Load(Python),
- }, nil, nil, `
+ return t.New("setuptools-"+version, 0, t.AppendPresets(nil,
+ Python,
+ ), nil, nil, `
pip3 install \
--no-index \
--prefix=/system \
@@ -132,10 +134,14 @@ func init() {
artifactsM[Setuptools] = Metadata{
f: Toolchain.newSetuptools,
- Name: "setuptools",
+ Name: "python-setuptools",
Description: "the autotools of the Python ecosystem",
Website: "https://pypi.org/project/setuptools/",
+ Dependencies: P{
+ Python,
+ },
+
ID: 4021,
}
}
@@ -272,8 +278,6 @@ func init() {
"https://files.pythonhosted.org/packages/"+
"78/55/896b06bf93a49bec0f4ae2a6f1ed12bd05c8860744ac3a70eda041064e4d/",
PythonDistlib,
- PythonFilelock,
- PythonPlatformdirs,
PythonDiscovery,
)
@@ -288,10 +292,6 @@ func init() {
PythonIdentify,
PythonNodeenv,
PythonPyYAML,
- PythonDistlib,
- PythonFilelock,
- PythonPlatformdirs,
- PythonDiscovery,
PythonVirtualenv,
)
}