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)"