Skip to content

Publish architecture-specific macOS wheels for policyengine-uk-compiled #70

@anth-volk

Description

@anth-volk

Problem

The policyengine-uk-compiled wheel currently packages a native policyengine-uk-rust executable. The published macOS artifact can be selected by pip on Intel macOS even when the bundled executable is arm64-only, causing runtime failures such as Bad CPU type in executable when the Python wrapper invokes the binary.

Because this package ships a platform-native executable, the wheel tags need to describe the executable architecture accurately. A universal2 tag is only correct if the bundled binary is actually universal/fat and contains both x86_64 and arm64 slices.

Desired outcome

  • Build separate macOS wheels for x86_64-apple-darwin and aarch64-apple-darwin.
  • Tag those wheels as architecture-specific macOS wheels instead of universal2.
  • Validate that the wheel filename, internal WHEEL metadata, and bundled executable architecture agree before upload.
  • Keep any release-time retagging explicit and tested.

Testing considerations

The repository has Rust and Python wrapper tests on PRs, and the publish workflow builds wheels for release. It should also have packaging-specific checks that fail before publishing if a wheel is mislabeled or contains the wrong native executable.

A follow-up may be needed for Linux wheel compatibility tags: if wheels are built in manylinux_2_28 containers, the release process should either tag them accordingly or verify lower manylinux compatibility before using older tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions