Files
duan_jandClaude Fable 5 cb65827159 PanDDA 0.2.14: new module via ccp4-python pip, ccp4/9.0 dep
Installs panddas into its own prefix (--prefix + --ignore-installed) so the
shared ccp4/9.0 module is never modified; PYTHONPATH prepend shadows the
ccp4-bundled copy. ccp4/9.0 is build- and runtime dependency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152MuuYUaapP7CtxrDAfvBh
2026-08-24 20:23:38 +02:00

37 lines
1.3 KiB
Python

#!/usr/bin/env modbuild
pbuild::prep() {
:
}
pbuild::configure() {
:
}
pbuild::compile() {
:
}
pbuild::install() {
# ccp4/9.0 is a build_requires, so ccp4-python is on PATH here.
command -v ccp4-python >/dev/null || \
std::die 42 "PanDDA: ccp4-python not on PATH — ccp4/9.0 module did not load"
# Vendor doc says: uninstall bundled panddas, upgrade pip+numpy, pip install
# panddas — all of which would mutate the shared ccp4/9.0 module. Instead:
# --prefix keeps everything inside this module, --ignore-installed pulls
# fresh deps (incl. numpy) here rather than reusing/soiling ccp4's, and the
# modulefile's PYTHONPATH prepend shadows the ccp4-bundled panddas.
ccp4-python -m pip install --prefix="${PREFIX}" --ignore-installed \
"panddas==${V_PKG}" || \
std::die 42 "PanDDA: pip install failed — check network and ccp4-python version"
# stable alias so the modulefile needn't know ccp4's python X.Y
local -a sp=( "${PREFIX}"/lib/python*/site-packages )
[[ -d "${sp[0]}" ]] || std::die 42 "PanDDA: no site-packages under ${PREFIX}/lib"
ln -sfn "${sp[0]#"${PREFIX}"/}" "${PREFIX}/site-packages"
[[ -x "${PREFIX}/bin/pandda.analyse" ]] || \
std::die 42 "PanDDA: bin/pandda.analyse missing — install incomplete"
}