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
This commit is contained in:
2026-08-24 20:23:38 +02:00
co-authored by Claude Fable 5
parent 5f354dd5cb
commit cb65827159
4 changed files with 88 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# PanDDA
Pan-Dataset Density Analysis (`panddas` from PyPI) for fragment-screening MX data.
<https://pandda.bitbucket.io>
Installed with ccp4/9.0's `ccp4-python -m pip`, but into this module's own prefix
(`--prefix` + `--ignore-installed`) so the shared ccp4/9.0 install is never modified.
The vendor's "uninstall bundled panddas / upgrade pip+numpy inside ccp4" steps are
replaced by the modulefile's PYTHONPATH prepend, which shadows ccp4's bundled copy.
ccp4/9.0 is both build- and runtime dependency (auto-loaded).
Build on Ra: see repo README / new-module recipe (`modbuild build 0.2.14`).
Verify after load:
```bash
ccp4-python -c 'import pandda; print(pandda.__file__)' # must point into /opt/psi/MX/PanDDA
pandda.analyse -h
```
Note: panddas 0.2.14 (2018) predates CCP4 9's Python 3.9; if it fails with py2
syntax errors at runtime, the tool needs the CCP4 7-era python or PanDDA2 instead.
+36
View File
@@ -0,0 +1,36 @@
#!/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"
}
+14
View File
@@ -0,0 +1,14 @@
---
format: 1
PanDDA:
defaults:
group: MX
overlay: base
relstage: unstable
# no urls/shasums — pip fetches panddas==<version> from PyPI
versions:
0.2.14:
config:
relstage: unstable
build_requires: [ccp4/9.0]
runtime_deps: [ccp4/9.0]
+16
View File
@@ -0,0 +1,16 @@
#%Module1.0
module-whatis "PanDDA: multi-dataset crystallographic analysis for fragment screening"
module-url "https://pandda.bitbucket.io"
module-license "CC BY-SA 4.0"
module-maintainer "Jiaxin Duan <jiaxin.duan@psi.ch>"
module-help "
PanDDA (panddas) installed into its own prefix with ccp4/9.0's ccp4-python.
ccp4/9.0 is auto-loaded as a runtime dependency; the PYTHONPATH prepend below
shadows the panddas copy bundled inside ccp4.
Main entry point: pandda.analyse
"
prepend-path PATH $PREFIX/bin
prepend-path PYTHONPATH $PREFIX/site-packages