From 9767ebbb1d04297f2fd5d26349320e44f46c5fcc Mon Sep 17 00:00:00 2001 From: Dawn Date: Thu, 3 Sep 2026 09:37:00 +0200 Subject: [PATCH] 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 --- pymol-open-source/build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pymol-open-source/build b/pymol-open-source/build index f8ec693..ac74239 100755 --- a/pymol-open-source/build +++ b/pymol-open-source/build @@ -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" }