From 14044dcd4c4cdff637c2b42342e85bc0b4aa9f71 Mon Sep 17 00:00:00 2001 From: rfs Date: Mon, 19 Oct 2026 12:34:49 +0100 Subject: [PATCH] perf(iso): trim conda env include/ + pycache to clear 5 GB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full ISO at zstd-19 came in at 5.2 GB — ~200 MB over the SourceForge 5 GB budget (down from 5.9 GB). Remove the two remaining safe-to-drop items from the telcosec-sdr conda env: - include/ C/C++ headers (only needed to build against the env — an advanced dev task; conda install restores them). ~200 MB. - __pycache__ / *.pyc byte-compile caches (regenerated on demand). Both are strictly runtime-dead and scoped to the conda tree. Expected final ISO ~5.0 GB or just under. Confirmed by the next validation build. Co-Authored-By: Claude Opus 4.8 --- build-iso.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build-iso.sh b/build-iso.sh index d08ad0e..1da8028 100644 --- a/build-iso.sh +++ b/build-iso.sh @@ -606,9 +606,14 @@ rm -rf /opt/telcosec/miniconda/pkgs/ 2>/dev/null || true _CONDA_ENVS=/opt/telcosec/miniconda/envs if [ -d "$_CONDA_ENVS" ]; then find "$_CONDA_ENVS" -type f -name '*.a' -delete 2>/dev/null || true - # NOTE: include/ is intentionally NOT removed — GNU Radio OOT module builds - # and SWIG/pybind flows in the live session may need the headers. Static - # libs, tests, docs and debug symbols below are safe runtime-dead weight. + # C/C++ headers: only needed to *build* against the env (GNU Radio OOT modules, + # SWIG/pybind). That is an advanced dev task; a user who needs it can + # `conda install` the -dev packages back. Removing include/ reclaims ~200 MB + # and is what brings the full ISO under the 5 GB SourceForge budget. + find "$_CONDA_ENVS" -type d -name include -prune -exec rm -rf {} + 2>/dev/null || true + # Byte-compiled Python caches inside the env (regenerated on demand). + find "$_CONDA_ENVS" -type d -name '__pycache__' -prune -exec rm -rf {} + 2>/dev/null || true + find "$_CONDA_ENVS" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete 2>/dev/null || true # Python test suites inside the env's site-packages (numpy/scipy/etc.). find "$_CONDA_ENVS" -type d \( -name tests -o -name test \) \ -path '*/site-packages/*' -prune -exec rm -rf {} + 2>/dev/null || true