harden pymol-open-source install check: import _cmd, not just launcher
Launcher existed while compiled ext was missing (partial compile -> pure-python wheel installed from poisoned uv cache). Import pymol._cmd at install time so a broken build dies in modbuild, not at runtime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,4 +44,8 @@ pbuild::install() {
|
||||
"$UV" pip install --python "$PREFIX/venv/bin/python" PyQt5 || \
|
||||
std::die 42 "PyQt5 install failed"
|
||||
[[ -x "$PREFIX/venv/bin/pymol" ]] || std::die 42 "pymol launcher missing from venv"
|
||||
# launcher can exist while the compiled ext is missing (pure-python wheel from a
|
||||
# poisoned uv cache); import _cmd directly so a broken build dies here, not at runtime
|
||||
"$PREFIX/venv/bin/python" -c "import pymol._cmd" || \
|
||||
std::die 42 "pymol._cmd import failed - ext .so missing; try 'uv cache clean pymol-open-source' and rebuild"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user