1
0
forked from rosa/hakurei

internal/rosa: helpers for common url formats

This cleans up call site of NewPackage.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-13 15:23:41 +09:00
parent eeaf26e7a2
commit 83b0e32c55
65 changed files with 471 additions and 419 deletions

View File

@@ -13,10 +13,10 @@ func (t Toolchain) newPython() (pkg.Artifact, string) {
version = "3.14.4"
checksum = "X0VRAAGOlCVldh4J9tRAE-YrJtDvqfQTJaqxKPXNX6YTPlwpR9GwA5WRIZDO-63s"
)
return t.NewPackage("python", version, pkg.NewHTTPGetTar(
nil, "https://www.python.org/ftp/python/"+version+
return t.NewPackage("python", version, newTar(
"https://www.python.org/ftp/python/"+version+
"/Python-"+version+".tgz",
mustDecode(checksum),
checksum,
pkg.TarGzip,
), &PackageAttr{
// test_synopsis_sourceless assumes this is writable and checks __pycache__
@@ -142,11 +142,9 @@ pip3 install \
--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,
`, pkg.Path(AbsUsrSrc.Append("setuptools"), true, newFromGitHub(
"pypa/setuptools",
"v"+version, checksum,
))), version
}
func init() {