Skip to content

fix(deps): cap pymupdf below 2 so Intel Macs can install - #5481

Merged
kovtcharov-amd merged 2 commits into
mainfrom
fix/pymupdf-intel-mac
Oct 21, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
fix/pymupdf-intel-mac

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Intel Mac users couldn't install amd-gaia[rag] or [ui] (and so gaia init --profile chat), and the v0.25.1-rc1 publish failed to build the darwin-x64 agent binary. pymupdf 2.0, released after v0.25.0, ships no macOS x86_64 wheel, and its source package doesn't build (it calls itself pymupdf-lite). Capping pymupdf below 2 puts every platform back on the 1.x wheels v0.25.0 shipped with; a platform-only cap isn't possible because gaia init refuses platform markers on extras.

Test plan

  • uv pip compile setup.py --extra rag and --extra ui (py3.12, --only-binary pymupdf) resolve pymupdf==1.28.2 for darwin-x64, darwin-arm64, linux-x64 and win-x64
  • pytest tests/unit/test_dependency_major_caps.py tests/unit/test_ui_extras.py tests/unit/agents/test_install_hints.py tests/unit/rag hub/agents/gaia/python/tests/test_freeze_required_modules.py
  • python util/lint.py --all
  • Offline Integration Tests: gaia init --profile chat journey passes
  • build_flagship_sidecar.yml dispatched on this branch: all four freezes, including darwin-x64, pass their smoke test

Installing amd-gaia[rag] or [ui] on an Intel Mac failed, and so did the
darwin-x64 freeze of the flagship agent in the v0.25.1-rc1 publish run.
pymupdf 2.0 ships no macOS x86_64 wheel, so the resolver falls back to its
sdist, whose metadata names itself pymupdf-lite and never builds.

Intel Macs now get pymupdf>=1.24,<2 (resolves to the 1.28.2 wheel) through
an environment marker; every other platform keeps the 2.x range the rc1
binaries were smoke-tested with, including the package data #5420 bundles.
A packaging test checks each extra gives every platform exactly one
pymupdf requirement and holds only darwin-x64 below 2.
@github-actions github-actions Bot added dependencies Dependency updates tests Test changes labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

This fixes installing amd-gaia[rag] and [ui] on Intel Macs. pymupdf 2.0 has no Intel-Mac wheel and its source package won't build, so Intel Macs now get pymupdf 1.x and every other platform still gets 2.x. Each platform gets exactly one pymupdf requirement, so no platform loses PDF support, and the new test checks that on all five release platforms for both extras.

The one open item is in the author's own test plan: the darwin-x64 sidecar build on this branch is still unchecked. That run is what proves the frozen binary builds and passes its smoke test on pymupdf 1.x, so it's worth seeing it green before merge.

Real-world evidence

N/A: this PR only changes packaging metadata and tests, and no evidence bundle was produced. The verdict rests on a static review. The per-platform resolution results (uv pip compile) are the author's, from the PR description; I didn't re-run them. The darwin-x64 freeze is unverified until build_flagship_sidecar.yml runs on this branch.

🔍 Technical details

Issues found: none blocking.

  • 🟢 The two comments about the split differ (setup.py:217 and setup.py:317). The [ui] copy says "same split as the rag extra" but gives a shorter reason than the [rag] copy. That's harmless. Just remember that if the cap is ever lifted (when pymupdf ships an Intel wheel), both extras have to change together. The new test will catch it if only one changes.

Checked and correct

  • The two markers are exact opposites (!= darwin or != x86_64 against == darwin and == x86_64), so no platform matches both and none matches neither.
  • Rosetta case: x86_64 Python on Apple Silicon reports platform_machine == 'x86_64' and gets 1.x. That's right, because it needs an x86_64 wheel.
  • The freeze side (freeze.py COLLECT_DATA/hidden imports for pymupdf) doesn't depend on the version, so no change is needed there.

Strengths

  • The test is built from the platform matrix and checks the three properties that matter: exactly one requirement on each platform, only darwin-x64 excludes 2.x, and 1.28.2 is accepted everywhere. It runs against setup.py without installing anything, like the existing major-cap guards.
  • The change is tightly scoped: two requirement lines per extra and one test.

The per-platform marker broke `gaia init --profile chat` everywhere: init
reads the extras back from GAIA's installed metadata and refuses any
condition beyond `extra == ...`. A plain `<2` cap needs no marker and puts
every platform on the 1.x wheels v0.25.0 shipped with.

CI's unit lanes now install `pymupdf<2` too, so tests run against the
version users get, and a test keeps extras free of platform markers.
@kovtcharov-amd kovtcharov-amd changed the title fix(deps): keep Intel Macs on pymupdf 1.x fix(deps): cap pymupdf below 2 so Intel Macs can install Oct 21, 2026
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Oct 21, 2026
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The darwin-x64 freeze now passes: build_flagship_sidecar.yml on this branch built and smoke-tested all four platforms (https://github.com/amd/gaia/actions/runs/39591163323). The per-platform split is gone, so the comment nit no longer applies: the marker broke gaia init --profile chat, which refuses platform markers on extras, so the cap is now a plain <2 everywhere.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 0b14d74 Oct 21, 2026
57 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/pymupdf-intel-mac branch October 21, 2026 11:49
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Oct 24, 2026
…5625)

The v0.25.1 notes stopped at the release PR (amd#5474). That left fixes
that users will notice out of the notes, and the changelog stopped short
of the release commit. This PR adds those three fixes: the GAIA agent
starts on Ubuntu 22.04, Debian 12 and RHEL 9 (amd#5545); Intel Macs can
install again (amd#5546, amd#5481); and Windows settings folders you can read
but can't create files in now load (amd#5469). It also adds six fixes from
rc6 and rc7 and regenerates the changelog from git against rc7.

## Test plan
- [x] `python util/validate_release_notes.py docs/releases/v0.25.1.mdx
--tag v0.25.1`
- [x] `pytest tests/unit/test_docs_json_release.py`
- [x] `mintlify validate` from `docs/`
- [x] The changelog lists 213 commits, the same count as `git rev-list
--count v0.25.0..v0.25.1-rc7`. The narrative stays within the 350-word
patch cap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant