Skip to content

Default to fasttree over veryfasttree on Macs without a native wheel - #10

Merged
AlexWindels merged 1 commit into
mainfrom
feat/macos-arm64-tree-tool-default
Aug 10, 2026
Merged

Default to fasttree over veryfasttree on Macs without a native wheel#10
AlexWindels merged 1 commit into
mainfrom
feat/macos-arm64-tree-tool-default

Conversation

@AlexWindels

Copy link
Copy Markdown
Collaborator

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 string NOTFOUND to 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.

  • New candy.platform_utils module: shared, unit-tested OS/arch detection (is_apple_silicon_under_rosetta, is_macos_without_native_veryfasttree_wheel). Refactored the existing Rosetta warning in pipeline.py to use it instead of duplicating the sysctl logic.
  • PipelineConfig.tree_tool now 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).
  • New --tree-tool / --alignment-tool CLI flags (previously Python-API only).
  • Fixed environment.yml, which was missing fasttree entirely despite the README implying it was available through it. Deliberately did not add mafft there -- it has no osx-arm64 build and would break conda env create on exactly the platform that now needs this file for fasttree.
  • README: rewrote the Apple Silicon section to cover both issues (Rosetta interpreter vs. this separate wheel gap) distinctly, plus a "Step 0" terminal-architecture check -- uv itself was observed getting fooled into installing x86_64 by a Rosetta-translated terminal app, discovered while debugging this live.

Test plan

  • pytest -- 132 passed (new tests/test_platform_utils.py covers both detection functions across Darwin/non-Darwin, arm64/x86_64, translated/native, and a missing-sysctl fallback; tests/test_config.py covers the default_tree_tool() factory and that PipelineConfig() picks it up automatically but an explicit tree_tool= still wins; tests/test_cli.py covers the new flags, including that omitting them defers to the platform-aware default)
  • python -m build + confirmed platform_utils.py is included in the built wheel
  • Reviewer: confirm CI passes on this PR

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
AlexWindels merged commit 8c97379 into main Aug 10, 2026
6 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant