Default to fasttree over veryfasttree on Macs without a native wheel - #10
Merged
Merged
Conversation
veryfasttree (as of 4.0.4.1) ships no macOS arm64 wheel at all, for any Python version, so it always falls back to a from-source build on Apple Silicon -- and that build fails on stock macOS due to an upstream OpenMP-detection bug in its own CMakeLists.txt. The same risk applies running x86_64 Python under Rosetta translation (a wheel exists there, but running it translated is the same SIGILL class of bug already seen with FAMSA). - New candy.platform_utils module: shared, testable OS/architecture detection (is_apple_silicon_under_rosetta, and the new is_macos_without_native_veryfasttree_wheel), used by both the existing Rosetta warning in pipeline.py and a new platform-aware default in config.py. - PipelineConfig.tree_tool now defaults to 'fasttree' instead of 'veryfasttree' specifically where the latter has no working native path, via a default_factory -- both CLI and direct Python API users get this automatically. - Add --tree-tool/--alignment-tool CLI flags (previously Python-API only) so this can also be overridden explicitly either direction. - Fix environment.yml, which was missing fasttree entirely despite the README implying it was available through it; deliberately don't add mafft there since it has no osx-arm64 build and would break `conda env create` on exactly the platform that now needs this file. - README: rewrite the Apple Silicon section to cover both the Rosetta interpreter issue and this separate veryfasttree-wheel issue, with a Step 0 terminal-architecture check (uv itself can be fooled by a translated shell, learned the hard way) before either fix path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AlexWindels
pushed a commit
that referenced
this pull request
Aug 10, 2026
Patch release: default to fasttree over veryfasttree on Macs where the latter has no working native build, plus new --tree-tool/--alignment-tool CLI flags (#10). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
veryfasttree(4.0.4.1, still latest) ships no macOS arm64 wheel at all, for any Python version -- confirmed directly against PyPI's wheel list. That forces a from-source build on every Apple Silicon Mac, which then fails on stock macOS due to an upstream bug:find_package(OpenMP)fails (Apple's Clang has no OpenMP by default) and veryfasttree's own CMake fallback for that case passes the literal stringNOTFOUNDto the compiler. Running x86_64 Python under Rosetta translation sidesteps the missing-wheel problem (a real x86_64 wheel exists) but reintroduces the SIGILL risk already seen with FAMSA.candy.platform_utilsmodule: shared, unit-tested OS/arch detection (is_apple_silicon_under_rosetta,is_macos_without_native_veryfasttree_wheel). Refactored the existing Rosetta warning inpipeline.pyto use it instead of duplicating thesysctllogic.PipelineConfig.tree_toolnow defaults to'fasttree'instead of'veryfasttree'specifically where the latter has no working native path (default_factory, so both CLI and direct Python-API users get it automatically, and it's still fully overridable).--tree-tool/--alignment-toolCLI flags (previously Python-API only).environment.yml, which was missingfasttreeentirely despite the README implying it was available through it. Deliberately did not addmafftthere -- it has noosx-arm64build and would breakconda env createon exactly the platform that now needs this file forfasttree.uvitself was observed getting fooled into installing x86_64 by a Rosetta-translated terminal app, discovered while debugging this live.Test plan
pytest-- 132 passed (newtests/test_platform_utils.pycovers both detection functions across Darwin/non-Darwin, arm64/x86_64, translated/native, and a missing-sysctlfallback;tests/test_config.pycovers thedefault_tree_tool()factory and thatPipelineConfig()picks it up automatically but an explicittree_tool=still wins;tests/test_cli.pycovers the new flags, including that omitting them defers to the platform-aware default)python -m build+ confirmedplatform_utils.pyis included in the built wheel