internal/rosa: setuptools artifact
All checks were successful
Test / Create distribution (push) Successful in 1m14s
Test / Sandbox (push) Successful in 3m5s
Test / ShareFS (push) Successful in 4m25s
Test / Hpkg (push) Successful in 4m55s
Test / Sandbox (race detector) (push) Successful in 5m28s
Test / Hakurei (race detector) (push) Successful in 6m26s
Test / Hakurei (push) Successful in 2m47s
Test / Flake checks (push) Successful in 1m51s

Apparently the only way to install python stuff offline.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-26 02:23:03 +09:00
parent 490471d22b
commit 228489371d
3 changed files with 25 additions and 0 deletions

View File

@@ -186,6 +186,8 @@ func main() {
p = rosa.Python p = rosa.Python
case "rsync": case "rsync":
p = rosa.Rsync p = rosa.Rsync
case "setuptools":
p = rosa.Setuptools
case "zlib": case "zlib":
p = rosa.Zlib p = rosa.Zlib

View File

@@ -29,6 +29,7 @@ const (
PkgConfig PkgConfig
Python Python
Rsync Rsync
Setuptools
Zlib Zlib
// _presetEnd is the total number of presets and does not denote a preset. // _presetEnd is the total number of presets and does not denote a preset.

View File

@@ -63,3 +63,25 @@ make DESTDIR=/work install
))) )))
} }
func init() { artifactsF[Python] = Toolchain.newPython } func init() { artifactsF[Python] = Toolchain.newPython }
func (t Toolchain) newSetuptools() pkg.Artifact {
const (
version = "80.10.1"
checksum = "p3rlwEmy1krcUH1KabprQz1TCYjJ8ZUjOQknQsWh3q-XEqLGEd3P4VrCc7ouHGXU"
)
return t.New("setuptools-"+version, []pkg.Artifact{
t.Load(Python),
}, nil, nil, `
pip3 install \
--no-index \
--prefix=/system \
--root=/work \
/usr/src/setuptools
`, pkg.Path(AbsUsrSrc.Append("setuptools"), true, pkg.NewHTTPGetTar(
nil, "https://github.com/pypa/setuptools/archive/refs/tags/"+
"v"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
func init() { artifactsF[Setuptools] = Toolchain.newSetuptools }