From 7a5ca6638a91c752c966df86164cf812cac86304 Mon Sep 17 00:00:00 2001 From: Dawn Date: Thu, 3 Sep 2026 10:26:17 +0200 Subject: [PATCH] pymol-open-source: wipe stale setuptools build tree + build wheel with --no-cache Two cache layers kept resurrecting a pure-python wheel without _cmd.so: - modbuild -f re-untars over the old src dir, leaving a stale build/ tree from a half-failed compile; setup.py packs it as-is - uv's built-wheel cache (in UV_CACHE_DIR, not ~/.cache/uv) then serves that wheel on every rebuild (Prepared in ~550ms = no compile) rm -rf $SRC_DIR/build in configure + --no-cache on the pymol install kill both permanently. Co-Authored-By: Claude Fable 5 --- pymol-open-source/build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pymol-open-source/build b/pymol-open-source/build index ac79e25..c4ede00 100755 --- a/pymol-open-source/build +++ b/pymol-open-source/build @@ -16,6 +16,11 @@ pbuild::configure() { export UV_PYTHON_INSTALL_DIR="$PREFIX/python" "$UV" venv --python 3.12 "$PREFIX/venv" || std::die 42 "uv venv failed - is uv at \$UV?" + # modbuild -f re-untars over the old src dir without deleting extras; a stale + # setuptools build/ tree from a failed run then gets packed into the wheel as-is + # (pure-python, no _cmd.so). Wipe it so every build compiles from scratch. + rm -rf "$SRC_DIR/build" + # stage glm where setup.py's PREFIX_PATH lookup expects it: /include/glm. # strip_dirs applies to the glm tarball too, so headers land at $SRC_DIR/glm directly mkdir -p "$SRC_DIR/deps/include" @@ -36,7 +41,9 @@ pbuild::install() { # -C k=v reaches setup.py as `build_ext --k=v` (_custom_build/backend.py). # str2bool accepts ONLY true/false (yes/no -> "Boolean value expected"). # no-vmd-plugins=false is deliberate: upstream dest is vmd_plugins, false disables them. - "$UV" pip install --python "$PREFIX/venv/bin/python" \ + # --no-cache: never reuse a cached pymol wheel — a poisoned pure-python wheel + # (built from a half-failed compile) otherwise gets reinstalled forever + "$UV" pip install --no-cache --python "$PREFIX/venv/bin/python" \ -C use-msgpackc=no -C no-libxml=true -C no-vmd-plugins=false \ "$SRC_DIR" || \ std::die 42 "pymol build failed - check system devel RPMs (glew, libpng, freetype, mesa-libGL)"