Skip to content

Build native arm64 macOS wheels#466

Open
vinay553 wants to merge 7 commits into
masterfrom
codex/fix-macos-wheel-arch
Open

Build native arm64 macOS wheels#466
vinay553 wants to merge 7 commits into
masterfrom
codex/fix-macos-wheel-arch

Conversation

@vinay553

@vinay553 vinay553 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR fixes the tagged PyPI publish path for scale-nucleus 0.18.8 native wheels.

Root Cause

There were two publish-path issues:

  1. The macOS job requested universal2 on a CircleCI Apple Silicon runner, but the build produced an arm64 wheel that cibuildwheel then tried to test under x86_64.
  2. The Linux job installed an unpinned cibuildwheel from a Python 3.10 host. That resolved to an older compatible builder that did not produce the requested cp314 Linux wheel.

The fix is to make the wheel builder deterministic and align the macOS architecture request with what the runner actually builds.

Changes

  • Build macOS wheels as native arm64 wheels instead of universal2.
  • Pin release wheel jobs to cibuildwheel==4.1.0.
  • Run the Linux wheel builder from cimg/python:3.12 so the pinned builder can run and build the full Python 3.10 through 3.14 target matrix.
  • Select an explicit Python 3.11+ host interpreter in the Windows wheel job before installing and running cibuildwheel.
  • Bump the package version to 0.18.8 and add the changelog entry.

The release workflow remains tag-only for build_sdist, platform wheel builds, and pypi_publish.

Validation

  • circleci config validate .circleci/config.yml
  • circleci config process .circleci/config.yml
  • pre-commit run --all-files
  • NUCLEUS_PYTEST_API_KEY=dummy pytest tests/test_local_deduplication.py -q
  • Full Linux cibuildwheel matrix through Colima/Docker for cp310 through cp314
  • During PR validation, the CircleCI Linux, macOS, and Windows wheel jobs were run with these wheel settings and succeeded for Python cp310 through cp314.

Greptile Summary

  • Updates the release wheel build path for scale-nucleus 0.18.8.
  • Pins release wheel jobs to cibuildwheel==4.1.0 and runs Linux builds from a Python 3.12 image.
  • Switches macOS wheel builds to native arm64 and updates the Windows host interpreter setup.
  • Adds the 0.18.8 changelog entry and package version bump.

Confidence Score: 5/5

The changes are limited to release packaging configuration and version metadata, with no review comments identified.

The updated wheel build configuration is narrowly scoped and the provided validation covers CircleCI config processing, pre-commit checks, focused tests, and platform wheel build paths.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex loaded the before artifact showing the initial CI build matrix configuration across Linux, macOS, and Windows.
  • T-Rex loaded the after artifact showing the updated CI build matrix: head Linux uses a cimg/python:3.12 image and cibuildwheel 4.1.0; macOS uses cibuildwheel 4.1.0 with CIBW_ARCHS_MACOS=arm64; Windows uses a Python host path and retains cp310 through cp314 support.
  • T-Rex confirmed both artifacts include build_sdist, build_linux_wheels, build_macos_wheels, build_windows_wheels, and pypi_publish with branch ignore and tag-only filters.
  • T-Rex observed that before the change scale-nucleus was 0.18.7 with no 0.18.8 changelog, and after the change it is 0.18.8 with a 0.18.8 changelog and all requested checks true.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. .circleci/config.yml, line 289-320 (link)

    P1 Run wheels on PRs

    These branch filters make build_sdist and all three wheel jobs tag-only again because they ignore every branch while keeping the existing tag filter. A normal PR branch will skip the release artifact jobs, so the pinned cibuildwheel matrix is not exercised until the release tag. Please let these jobs run on PR branches while keeping only pypi_publish tag-only; when doing that, restore the empty-CIRCLE_TAG guard in the sdist tag/version check so PR sdist builds do not fail before packaging.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: .circleci/config.yml
    Line: 289-320
    
    Comment:
    **Run wheels on PRs**
    
    These branch filters make `build_sdist` and all three wheel jobs tag-only again because they ignore every branch while keeping the existing tag filter. A normal PR branch will skip the release artifact jobs, so the pinned `cibuildwheel` matrix is not exercised until the release tag. Please let these jobs run on PR branches while keeping only `pypi_publish` tag-only; when doing that, restore the empty-`CIRCLE_TAG` guard in the sdist tag/version check so PR sdist builds do not fail before packaging.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Cursor Fix in Claude Code Fix in Codex

Reviews (5): Last reviewed commit: "Select Windows host Python for wheel bui..." | Re-trigger Greptile

Comment thread scripts/validate_release_artifacts.py Outdated
Comment on lines +65 to +70
expected_platforms = {
"linux": lambda name: "manylinux" in name,
"macos": lambda name: "macosx_" in name
and name.endswith("_arm64.whl"),
"windows": lambda name: name.endswith("win_amd64.whl"),
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Pin Linux architecture

The Linux platform check accepts any wheel whose name contains manylinux. If the Linux build produces the wrong architecture, such as manylinux_aarch64, each cp3xx linux check can still pass as long as there are 15 wheels. The release validation would then allow a bundle that is missing the intended Linux x86_64 wheels.

Artifacts

Repro: fixture generator for wrong-architecture manylinux wheels

  • Contains supporting evidence from the run (text/x-python; charset=utf-8).

Repro: validator output showing wrong-architecture manylinux wheels pass with exit code 0

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/validate_release_artifacts.py
Line: 65-70

Comment:
**Pin Linux architecture**

The Linux platform check accepts any wheel whose name contains `manylinux`. If the Linux build produces the wrong architecture, such as `manylinux_aarch64`, each `cp3xx linux` check can still pass as long as there are 15 wheels. The release validation would then allow a bundle that is missing the intended Linux `x86_64` wheels.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Cursor Fix in Claude Code Fix in Codex

Comment thread .circleci/config.yml Outdated
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