# Shared environment for the in-container scripts. Sourced, not executed. # # Everything expensive or bulky (ccache, the CMake tree, pip's cache, the build # venv) lives under $CACHE, which the Makefile bind-mounts from outside the # repo — the root filesystem on this host has little headroom, and these # survive between runs to keep the inner loop incremental. CACHE="${CACHE_ROOT:-/cache}" export CCACHE_DIR="$CACHE/ccache" export PIP_CACHE_DIR="$CACHE/pip" export HOME="$CACHE" # containers run as the host uid; /root is not ours export CMAKE_C_COMPILER_LAUNCHER=ccache export CMAKE_CXX_COMPILER_LAUNCHER=ccache export CMAKE_PREFIX_PATH=/opt/occt export LD_LIBRARY_PATH=/opt/occt/lib export SKBUILD_BUILD_DIR="$CACHE/skbuild/{wheel_tag}" mkdir -p "$CCACHE_DIR" "$PIP_CACHE_DIR" VENV="$CACHE/venv" if [ ! -x "$VENV/bin/python" ]; then echo "--- creating build venv at $VENV ---" /opt/python/cp312-cp312/bin/python -m venv "$VENV" "$VENV/bin/pip" install -q --upgrade pip "$VENV/bin/pip" install -q build nanobind scikit-build-core pytest fi PY="$VENV/bin/python" export PY VENV CACHE