-
Notifications
You must be signed in to change notification settings - Fork 8
BuildingBdistForMacOSarm64 ‐ obsolete
GitHub Actions are now available for macOS arm64 architectures, so this document is now obsolete.
If not already installed, go to https://www.python.org/downloads/macos/ and download a stable release (any supported version will work). This usually gets installed to /usr/local/python3
See more about the cibuildwheel setup, specifically that macOS needs to have native build tools installed.
Create a temporary venv to install the Python build tools, e.g. for Python 3.11:
/usr/local/bin/python3 -m venv /tmp/py311
source /tmp/py311/bin/activate
pip install --upgrade pip
pip install cibuildwheel twine
With the below excerpt, update VERSION with the tagged release version. Also, match CIBW_BUILD with the Python version.
VERSION="0.1.0"
tmpdir=$(mktemp -d)
cd $tmpdir
curl -LO https://github.com/pypest/pypestutils/archive/refs/tags/v$VERSION.tar.gz
tar -xzf v$VERSION.tar.gz
cd pypestutils-$VERSION
CIBW_BUILD="cp311-*" cibuildwheel --platform macos --archs arm64
Check that the correct wheel was built and meets the standards before uploading. There should only be one file in wheelhouse
that ends with _arm64.whl
:
twine check --strict wheelhouse/*
If this looks good, make sure PyPI permissions are configured then upload the wheels:
twine upload wheelhouse/*