pymol-open-source: build with --no-build-isolation per upstream INSTALL

Upstream documents 'pip install --no-build-isolation .'. With default
build isolation the wheel builds in an isolated env upstream never
tests and comes out pure-python (no _cmd.so) without any error - the
root cause of the ModuleNotFoundError: pymol._cmd at runtime.
setuptools+numpy now pre-installed into the venv as build deps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 10:36:27 +02:00
co-authored by Claude Fable 5
parent 7a5ca6638a
commit 7beb62cf05
+7 -1
View File
@@ -41,9 +41,15 @@ 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.
# upstream's documented install is `pip install --no-build-isolation .`; with
# default isolation the wheel builds in an env upstream never tests and comes
# out pure-python (no _cmd.so) WITHOUT any error. Build deps must therefore
# be present in the venv itself.
"$UV" pip install --python "$PREFIX/venv/bin/python" setuptools numpy || \
std::die 42 "build deps (setuptools, numpy) install failed"
# --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" \
"$UV" pip install --no-cache --no-build-isolation --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)"