57b225071a
- recipes/dev/python312/recipe.toml: use COOKBOOK_TOOLCHAIN for --with-build-python instead of /tmp/python312, which the build system never stages. Add [ -x ] guard for clear failure on missing dev-dep. - recipes/core/userutils/recipe.toml: switch from upstream git URL to local fork (local/sources/userutils/) per the local fork model. The upstream source opens /scheme/pty/ptmx which the ptyd scheme does not recognize; the local fork opens /scheme/pty correctly and avoids the getty PTY panic. - local/scripts/build-preflight.sh: warn when a recipe build script references /tmp/<known-package>/, since the cookbook does not stage host dev-deps under /tmp/<name>. Points authors at COOKBOOK_TOOLCHAIN. - local/scripts/build-redbear.sh: replace 'tail -1 || true' on pre-cook failures with proper error capture, last-50-lines tail on failure, and exit-1. Verify the pkgar exists after a successful cook.
72 lines
1.7 KiB
TOML
72 lines
1.7 KiB
TOML
[source]
|
|
tar = "https://www.python.org/ftp/python/3.12.12/Python-3.12.12.tar.xz"
|
|
blake3 = "29636fdae3e0ee8d0fe585e528c9376fe43876f5f3f0f7892140567946fd907b"
|
|
patches = [
|
|
"redox.patch"
|
|
]
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"target:bzip2",
|
|
"target:libffi",
|
|
"target:openssl3",
|
|
"target:ncursesw",
|
|
"target:readline",
|
|
"target:sqlite3",
|
|
"target:zlib",
|
|
"target:xz",
|
|
"target:zstd",
|
|
]
|
|
dev-dependencies = [
|
|
"host:python312"
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
ARCH="${TARGET%%-*}"
|
|
OS=$(echo "${TARGET}" | cut -d - -f3-4)
|
|
|
|
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
|
|
BUILD_PYTHON="${COOKBOOK_TOOLCHAIN}/bin/python3.12"
|
|
if [ ! -x "${BUILD_PYTHON}" ]; then
|
|
echo "ERROR: host python312 dev-dependency not staged at ${BUILD_PYTHON}" >&2
|
|
exit 1
|
|
fi
|
|
COOKBOOK_CONFIGURE_FLAGS=(
|
|
--prefix=/usr
|
|
--disable-ipv6
|
|
--host=${GNU_TARGET}
|
|
--build="$ARCH"
|
|
--with-build-python="${BUILD_PYTHON}"
|
|
--with-ensurepip=install
|
|
--disable-test-modules
|
|
--with-ssl-default-suites=openssl
|
|
ac_cv_file__dev_ptmx=no
|
|
ac_cv_file__dev_ptc=no
|
|
ac_cv_exeext=""
|
|
)
|
|
else
|
|
COOKBOOK_CONFIGURE_FLAGS=(--prefix=/usr)
|
|
fi
|
|
|
|
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
|
|
export MODULE_BUILDTYPE=static
|
|
COOKBOOK_CONFIGURE_FLAGS+=( --enable-shared )
|
|
fi
|
|
|
|
cookbook_configure
|
|
|
|
# A same file to save 60MB
|
|
(cd "${COOKBOOK_STAGE}/usr/lib/python3.12/config-3.12-$ARCH-$OS" && \
|
|
rm -f libpython3.12.a && ln -s ../../libpython3.12.a)
|
|
"""
|
|
|
|
[[optional-packages]]
|
|
name = "dev"
|
|
files = [
|
|
"usr/lib/python3.12/config-*/**",
|
|
"usr/lib/libpython*.a"
|
|
]
|