All checks were successful
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m46s
Test / ShareFS (push) Successful in 3m59s
Test / Hpkg (push) Successful in 4m32s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 6m8s
Test / Flake checks (push) Successful in 1m36s
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
88 lines
2.1 KiB
Go
88 lines
2.1 KiB
Go
package rosa
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"hakurei.app/internal/pkg"
|
|
)
|
|
|
|
func (t Toolchain) newPython() pkg.Artifact {
|
|
const (
|
|
version = "3.14.2"
|
|
checksum = "7nZunVMGj0viB-CnxpcRego2C90X5wFsMTgsoewd5z-KSZY2zLuqaBwG-14zmKys"
|
|
)
|
|
skipTests := []string{
|
|
// requires internet access (http://www.pythontest.net/)
|
|
"test_asyncio",
|
|
"test_socket",
|
|
"test_urllib2",
|
|
"test_urllibnet",
|
|
"test_urllib2net",
|
|
|
|
// makes assumptions about uid_map/gid_map
|
|
"test_os",
|
|
"test_subprocess",
|
|
|
|
// somehow picks up mtime of source code
|
|
"test_zipfile",
|
|
|
|
// requires gcc
|
|
"test_ctypes",
|
|
|
|
// breaks on llvm
|
|
"test_dbm_gnu",
|
|
}
|
|
return t.New("python-"+version, false, []pkg.Artifact{
|
|
t.Load(Make),
|
|
t.Load(Zlib),
|
|
t.Load(Libffi),
|
|
}, nil, []string{
|
|
"EXTRATESTOPTS=-j0 -x " + strings.Join(skipTests, " -x "),
|
|
|
|
// _ctypes appears to infer something from the linker name
|
|
"LDFLAGS=-Wl,--dynamic-linker=/system/lib/" +
|
|
"ld-musl-" + linuxArch() + ".so.1",
|
|
}, `
|
|
# test_synopsis_sourceless assumes this is writable and checks __pycache__
|
|
chmod -R +w /usr/src/python/
|
|
|
|
export HOME="$(mktemp -d)"
|
|
cd "$(mktemp -d)"
|
|
/usr/src/python/configure \
|
|
--prefix=/system \
|
|
--build="${ROSA_TRIPLE}"
|
|
make "-j$(nproc)"
|
|
make test
|
|
make DESTDIR=/work install
|
|
`, pkg.Path(AbsUsrSrc.Append("python"), true,
|
|
pkg.NewHTTPGetTar(
|
|
nil, "https://www.python.org/ftp/python/"+version+
|
|
"/Python-"+version+".tgz",
|
|
mustDecode(checksum),
|
|
pkg.TarGzip,
|
|
)))
|
|
}
|
|
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, false, []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 }
|