#!/usr/bin/env modbuild

pbuild::prep() {
    :
}

pbuild::configure() {
    # repo.anaconda.com is unreachable from Ra (GnuTLS error), so no conda.
    # uv fetches a standalone CPython instead; keep it inside PREFIX so the
    # venv's interpreter symlinks don't depend on the builder's home cache.
    export UV_PYTHON_INSTALL_DIR="$PREFIX/python"
    uv venv --python 3.12 "$PREFIX/venv"
}

pbuild::compile() {
    :
}

pbuild::install() {
    # [cuda] extra ships the NVIDIA libs via pip wheels; works on CPU-only nodes too
    uv pip install --python "$PREFIX/venv/bin/python" "careless[cuda]==${V_PKG}"
}
