Skip to content

Add macOS arm64 wheel build guide and ignore rules#503

Merged
kozo2 merged 1 commit intomasterfrom
macos-arm64
Mar 24, 2026
Merged

Add macOS arm64 wheel build guide and ignore rules#503
kozo2 merged 1 commit intomasterfrom
macos-arm64

Conversation

@kozo2
Copy link
Copy Markdown
Member

@kozo2 kozo2 commented Mar 24, 2026

Document steps in README for building a macOS arm64 wheel for ecell4_base (brew deps, virtualenv, pip wheel command and verification). Also update .gitignore to ignore dist/ and ecell4_base.egg-info/ generated by the build.

Document steps in README for building a macOS arm64 wheel for ecell4_base (brew deps, virtualenv, pip wheel command and verification). Also update .gitignore to ignore dist/ and ecell4_base.egg-info/ generated by the build.
Copilot AI review requested due to automatic review settings March 24, 2026 15:52
@kozo2 kozo2 merged commit 840b45f into master Mar 24, 2026
6 checks passed
@kozo2 kozo2 deleted the macos-arm64 branch March 24, 2026 15:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation and repo ignore rules to support building a macOS arm64 wheel for ecell4_base, and to keep build artifacts out of git status.

Changes:

  • Documented a local workflow for building a macOS arm64 wheel (brew deps, uv venv, pip wheel, and a quick import check).
  • Updated .gitignore to ignore wheel build outputs (dist/) and metadata (ecell4_base.egg-info/).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Adds a macOS arm64 wheel build/how-to section and a verification snippet.
.gitignore Ignores wheel build output and egg-info directory created during builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +23
The following steps will build:
`dist/ecell4_base-2.1.2-cp310-cp310-macosx_26_0_arm64.whl`
on macOS Tahoe (Apple Silicon, arm64).
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The wheel filename here is hard-coded to a specific project version, Python ABI (cp310), and macOS tag (macosx_26_0_arm64). This will be different for other Python versions and depending on the build machine/deployment target, so readers following the guide may not find this exact file. Consider describing the output as a pattern (e.g., dist/*.whl) and/or referencing variables like and instead of a single concrete filename.

Copilot uses AI. Check for mistakes.
# uv venv --python 3.14
source .venv/bin/activate
uv pip install pip
CMAKE_OSX_ARCHITECTURES=arm64 pip wheel . -w dist --no-deps
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The build step doesn't set MACOSX_DEPLOYMENT_TARGET, so the produced wheel tag/compatibility may vary with the host OS version (often making wheels built on newer macOS not installable on older macOS). The repo's GitHub Actions wheel build sets MACOSX_DEPLOYMENT_TARGET="14.0" (.github/workflows/wheels.yml), so it would be more reproducible to document setting the same environment variable for local builds too.

Suggested change
CMAKE_OSX_ARCHITECTURES=arm64 pip wheel . -w dist --no-deps
MACOSX_DEPLOYMENT_TARGET=14.0 CMAKE_OSX_ARCHITECTURES=arm64 pip wheel . -w dist --no-deps

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +44
# 3) (Optional) Verify install from the built wheel in the above venv
pip install dist/ecell4_base-2.1.2-cp310-cp310-macosx_26_0_arm64.whl
python -c "from ecell4_base.core import *; sp1 = Species('A', 0.0025, 1); print(sp1.list_attributes())"
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

This verification step hard-codes the wheel filename (version/ABI/platform tag). If the user builds with a different Python version (the guide suggests 3.11+ above) or a different deployment target, the filename will differ and this command will fail. Consider using a glob (dist/*.whl) or showing how to discover the built wheel name (e.g., listing dist/) before installing.

Copilot uses AI. Check for mistakes.
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.

2 participants