build.lua 584 bytes · raw
-- The interpreter of the build machine, a python-build-standalone build copied as it is laid out: bin/python3 beside
-- lib/python3.14.
function build(slice, options, deps)
local r = slice.resources
local standalone = r.linux_x86_64 or r.linux_arm64 or r.linux_x86_64_musl or r.linux_arm64_musl
if not standalone then error("no prebuilt Python for this build machine") end
for _, dir in ipairs{ "bin", "lib" } do
otok.copy(standalone .. "/" .. dir, slice.prefix .. "/" .. dir)
end
return { programs = { python = slice.prefix .. "/bin/python3" } }
end
recipe.toml 2313 bytes · raw
# The otok recipe of Python (https://github.com/apotocki/otok): the python program for the build scripts of other
# recipes, which name it as their toolchain (`python = { default-recipe = "apotocki/python" }`), on Linux: the
# install_only build of python-build-standalone of the build machine (a resource per architecture and C library,
# fetched on that machine only: glibc's, or musl's on Alpine, `linux-<arch>-musl`). It has no pip packages: the
# standard library only. The source archive carries the license.
[recipe]
api = 1
library = "python"
name = "python"
version = "3.14.10"
revision = 2
license = "PSF-2.0"
license-files = ["LICENSE"]
homepage = "https://www.python.org"
description = "Python, the interpreter, prebuilt for the build machine."
keywords = ["python", "interpreter", "tool"]
[tool]
programs = ["python"]
[source]
url = "https://www.python.org/ftp/python/3.14.10/Python-3.14.10.tar.xz"
sha256 = "de414a57119abef52784d8993e341d53aed635fc2b05c2607d9f98a2c5b72032"
[[resource]]
name = "linux_x86_64"
url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261026/cpython-3.14.10%2B20261026-x86_64-unknown-linux-gnu-install_only.tar.gz"
sha256 = "1b38024924eb7f4cf0cab45d7b871d1f1991354190fccd2625ac7529a43786e2"
when = { host = ["linux-x86_64"] }
[[resource]]
name = "linux_arm64"
url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261026/cpython-3.14.10%2B20261026-aarch64-unknown-linux-gnu-install_only.tar.gz"
sha256 = "dcc31ce7b9ddbbffac160da7fff0cc069054f43eca52382a7d0eebf94e985b88"
when = { host = ["linux-arm64"] }
[[resource]]
name = "linux_x86_64_musl"
url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261026/cpython-3.14.10%2B20261026-x86_64-unknown-linux-musl-install_only.tar.gz"
sha256 = "4c03a4d9d582ce3610f622c2d69c9a83cbfbdd6fc1d75689820f8f54aa73f0dc"
when = { host = ["linux-x86_64-musl"] }
[[resource]]
name = "linux_arm64_musl"
url = "https://github.com/astral-sh/python-build-standalone/releases/download/20261026/cpython-3.14.10%2B20261026-aarch64-unknown-linux-musl-install_only.tar.gz"
sha256 = "2220e769dfae157c16cd387705bf6b9a934955d93e0b818112c2f296cc3ae50f"
when = { host = ["linux-arm64-musl"] }
[platforms]
supported = ["linux"]
build-on = ["linux/gcc", "linux/clang"]