careless installs plain careless (CPU). careless-gpu also installs plain careless but declares cuda/12.8.1 as build_requires/runtime_deps (jfjoch_viewer pattern) instead of pip-bundling CUDA via the [cuda] extra. Both builds honor UV_CACHE_DIR to share one download cache. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
27 lines
784 B
Python
Executable File
27 lines
784 B
Python
Executable File
#!/usr/bin/env modbuild
|
|
|
|
pbuild::prep() {
|
|
:
|
|
}
|
|
|
|
pbuild::configure() {
|
|
# same uv pattern as the careless (CPU) module; see that build for the whys
|
|
UV="${UV:-$HOME/.local/bin/uv}"
|
|
export UV_CACHE_DIR="${UV_CACHE_DIR:-$PREFIX/.uv-cache}"
|
|
export UV_PYTHON_INSTALL_DIR="$PREFIX/python"
|
|
"$UV" venv --python 3.12 "$PREFIX/venv"
|
|
}
|
|
|
|
pbuild::compile() {
|
|
:
|
|
}
|
|
|
|
pbuild::install() {
|
|
UV="${UV:-$HOME/.local/bin/uv}"
|
|
export UV_CACHE_DIR="${UV_CACHE_DIR:-$PREFIX/.uv-cache}"
|
|
# no [cuda] extra: CUDA comes from the cuda/12.8.1 module
|
|
# (build_requires/runtime_deps in files/config.yaml), not from pip wheels
|
|
"$UV" pip install --python "$PREFIX/venv/bin/python" "careless==${V_PKG}"
|
|
[[ "$UV_CACHE_DIR" == "$PREFIX"* ]] && rm -rf "$UV_CACHE_DIR" || :
|
|
}
|