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 <noreply@anthropic.com>
This commit is contained in:
@@ -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: <prefix>/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)"
|
||||
|
||||
Reference in New Issue
Block a user