internal/rosa: cpython artifact
All checks were successful
Test / Create distribution (push) Successful in 48s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 4m44s
Test / Sandbox (race detector) (push) Successful in 5m18s
Test / Hpkg (push) Successful in 5m29s
Test / Hakurei (push) Successful in 5m49s
Test / Hakurei (race detector) (push) Successful in 7m42s
Test / Flake checks (push) Successful in 1m44s
All checks were successful
Test / Create distribution (push) Successful in 48s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 4m44s
Test / Sandbox (race detector) (push) Successful in 5m18s
Test / Hpkg (push) Successful in 5m29s
Test / Hakurei (push) Successful in 5m49s
Test / Hakurei (race detector) (push) Successful in 7m42s
Test / Flake checks (push) Successful in 1m44s
Dependency of llvm build scripts, also an optional cure dependency of ninja. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
60
internal/rosa/python.go
Normal file
60
internal/rosa/python.go
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
package rosa
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"hakurei.app/internal/pkg"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPython returns a [pkg.Artifact] containing an installation of Python.
|
||||||
|
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",
|
||||||
|
|
||||||
|
// hits std.PresetExt ruleset
|
||||||
|
"test_os",
|
||||||
|
"test_posix",
|
||||||
|
"test_shutil",
|
||||||
|
|
||||||
|
// somehow picks up mtime of source code
|
||||||
|
"test_zipfile",
|
||||||
|
|
||||||
|
// requires gcc
|
||||||
|
"test_ctypes",
|
||||||
|
|
||||||
|
// breaks on llvm
|
||||||
|
"test_dbm_gnu",
|
||||||
|
}
|
||||||
|
return t.New("python-"+version, []pkg.Artifact{
|
||||||
|
t.NewMake(),
|
||||||
|
t.NewZlib(),
|
||||||
|
}, nil, []string{
|
||||||
|
"EXTRATESTOPTS=-j0 -x " + strings.Join(skipTests, " -x "),
|
||||||
|
}, `
|
||||||
|
# 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
|
||||||
|
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,
|
||||||
|
)))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user