From 56814bfc389e1c0843230750324782b4c88de0ec Mon Sep 17 00:00:00 2001 From: Yellowcooln <12516003+yellowcooln@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:27:04 -0400 Subject: [PATCH] Support local embedded Buildroot installs --- buildroot-manage.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/buildroot-manage.sh b/buildroot-manage.sh index 2c4e69c..4acbbf0 100644 --- a/buildroot-manage.sh +++ b/buildroot-manage.sh @@ -24,6 +24,8 @@ R2_ENABLED=1 YQ_VERSION="${YQ_VERSION:-v4.44.3}" PYMC_CORE_REPO="${PYMC_CORE_REPO:-https://github.com/rightup/pyMC_core.git}" PYMC_CORE_REF="${PYMC_CORE_REF:-}" +PYMC_CORE_LOCAL_DIR="${PYMC_CORE_LOCAL_DIR:-}" +PYMC_SKIP_BUILDROOT_DEP_INSTALL="${PYMC_SKIP_BUILDROOT_DEP_INSTALL:-0}" RADIO_SETTINGS_JSON="$SCRIPT_DIR/radio-settings.json" RADIO_PRESETS_JSON="$SCRIPT_DIR/radio-presets.json" BUILDROOT_RADIO_SETTINGS_JSON="$SCRIPT_DIR/radio-settings-buildroot.json" @@ -533,6 +535,15 @@ install_buildroot_dependencies() { local wheel_base local deps + if [ "${PYMC_SKIP_BUILDROOT_DEP_INSTALL}" = "1" ]; then + stage "Checking embedded Python dependency baseline" + if check_buildroot_dependencies_installed >/dev/null 2>&1; then + info "Image-provided Python dependency wheels already satisfy Buildroot requirements" + return 0 + fi + fail "Embedded/offline install requested, but the required Python dependency wheels are not already present in the image." + fi + wheel_base=$(get_r2_wheel_base 2>/dev/null || true) deps=$(set_wheel_dependencies) stage "Installing Python dependency wheels" @@ -614,6 +625,14 @@ PY install_core_into_venv() { local core_repo core_ref core_spec + if [ -n "$PYMC_CORE_LOCAL_DIR" ]; then + [ -d "$PYMC_CORE_LOCAL_DIR" ] || fail "Missing local pyMC_core checkout: $PYMC_CORE_LOCAL_DIR" + stage "Installing pyMC_core" + info "Local dir: ${PYMC_CORE_LOCAL_DIR}" + "$VENV_PIP" install --upgrade --no-cache-dir --no-deps --no-build-isolation "$PYMC_CORE_LOCAL_DIR" + return 0 + fi + core_repo="$PYMC_CORE_REPO" case "$core_repo" in *.git) ;;