Skip to content

py-quast: drop vestigial boost pin, fix Python 3.12+ compat, fix bundled minimap2 permissions - #6273

Open
gonzabotmdp wants to merge 1 commit into
spack:developfrom
gonzabotmdp:fix/py-quast-boost-pin-distutils-minimap2-perms
Open

py-quast: drop vestigial boost pin, fix Python 3.12+ compat, fix bundled minimap2 permissions#6273
gonzabotmdp wants to merge 1 commit into
spack:developfrom
gonzabotmdp:fix/py-quast-boost-pin-distutils-minimap2-perms

Conversation

@gonzabotmdp

Copy link
Copy Markdown
Contributor

Summary

Three independent, real issues found installing/using py-quast@5.2.0 for a genome-assembly QC pipeline:

1. Vestigial depends_on("boost@1.56.0"). setup.py never references boost at all (confirmed by grepping the full sdist) -- the pin is most likely inherited by copy-paste from the vendored BamTools/bedtools copies bundled inside quast_libs/ for offline use, but those vendored copies aren't what actually gets built; Spack's own separate bedtools2/glimmer/bwa dependencies (already declared below) are. The pin drags in an ancient (2014) boost version purely for no reason. Dropped it (plus the now-unused Boost.with_default_variants import).

2. distutils removal (Python 3.12+). quast_libs/qconfig.py does from distutils.version import LooseVersion just to check the running Python version falls within quast's own supported range. packaging.version.Version is a drop-in for the comparison usage here (Version(str), <, <=). Added depends_on("py-packaging") and swapped the import.

3. Bundled minimap2 fails for any user but the one who ran spack install. quast_libs/minimap2 is quast's own vendored minimap2 source, compiled lazily on first use via qutils.compile_tool() -- by design for a normal per-user pip install, but under Spack the install tree is only writable by whoever ran the install. Any other user running quast.py -r (reference alignment, the single most common invocation) hits a PermissionError trying to write quast_libs/minimap2/minimap2. Added a @run_after("install") hook that compiles it once during spack install itself (while install-tree write access is still available), so the binary is already built and world-readable/executable before any user touches it.

Testing

Installed py-quast@5.2.0, confirmed quast.py --version works, confirmed the bundled minimap2 binary is present with rwxr-xr-x permissions immediately after install (no lazy-compile step needed), and confirmed a real quast.py -r <reference> run (previously failing with PermissionError for a second, non-owner user) completes.

@spackbot-triage spackbot-triage Bot added python dependencies Modifications with a `depends_on()` directive update-package Modifications to packages in the repository labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Modifications with a `depends_on()` directive python update-package Modifications to packages in the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant