Add macOS arm64 wheel build guide and ignore rules#503
Conversation
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.
There was a problem hiding this comment.
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
.gitignoreto 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.
| The following steps will build: | ||
| `dist/ecell4_base-2.1.2-cp310-cp310-macosx_26_0_arm64.whl` | ||
| on macOS Tahoe (Apple Silicon, arm64). |
There was a problem hiding this comment.
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.
| # uv venv --python 3.14 | ||
| source .venv/bin/activate | ||
| uv pip install pip | ||
| CMAKE_OSX_ARCHITECTURES=arm64 pip wheel . -w dist --no-deps |
There was a problem hiding this comment.
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.
| 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 |
| # 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())" |
There was a problem hiding this comment.
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.
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.