#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 0, Chapter 7: Python (Chroot) # ============================================================================ # Purpose: Build Python 3 (scripting language). Required by meson and # many modern build systems. Minimal build — no pip, no SSL. # Inputs: /sources/Python-3.13.3.tar.xz # Outputs: python3 in /usr/bin/ # Assumes: Running inside chroot # Ref: LFS 13.0 §7.10 # ============================================================================ set -euo pipefail PACKAGE="Python" VERSION="3.13.3" echo "=== Building ${PACKAGE}-${VERSION} (Chroot) ===" cd /sources tar -xf "${PACKAGE}-${VERSION}.tar.xz" cd "${PACKAGE}-${VERSION}" ./configure --prefix=/usr \ --enable-shared \ --without-ensurepip make make install cd /sources rm -rf "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="