Skip to content

Build and publish macOS wheels via cibuildwheel#294

Open
AlexHill wants to merge 1 commit into
casacore:masterfrom
AlexHill:macos-wheels
Open

Build and publish macOS wheels via cibuildwheel#294
AlexHill wants to merge 1 commit into
casacore:masterfrom
AlexHill:macos-wheels

Conversation

@AlexHill

@AlexHill AlexHill commented Jul 3, 2026

Copy link
Copy Markdown

Taking another swing at this. @ludwigschwardt @tammojan if you have any time, could you please take a look?

Add macos-15 (arm64) and macos-15-intel (x86_64) runners to the release workflow, with before-all/before-build scripts that port the Linux wheel recipe, docker/py_wheel.docker in the casacore repo, to macOS. Boost.Python and casacore are compiled once per Python version, since libcasa_python3 embeds the CPython ABI.

As on Linux, libcasa_python3 doesn't link libpython. Python3_LIBRARY points at Boost.Python and Python symbols resolve from the host interpreter at import time, so the wheels work with any CPython of the matching version. Measures data is bundled into the wheels via CASACORE_DATA.

The casacore builds go through ccache, persisted with actions/cache, so only the first build of a Python-version series compiles casacore in full.

Dependency versions and locations are defined once in cibw_env.sh. The Linux-only CXXFLAGS/LD_LIBRARY_PATH move into [tool.cibuildwheel.linux].

Closes #232, I hope!

Add macos-15 (arm64) and macos-15-intel (x86_64) runners to the release
workflow, with before-all/before-build scripts that port the Linux wheel
recipe, docker/py_wheel.docker in the casacore repo, to macOS: Boost.Python
and casacore are compiled once per Python version, since libcasa_python3
embeds the CPython ABI.

As on Linux, libcasa_python3 links no real libpython: Python3_LIBRARY points
at Boost.Python and Python symbols resolve from the host interpreter at
import time, so the wheels work with any CPython of the matching version.
Measures data is bundled into the wheels via CASACORE_DATA.

The casacore builds go through ccache, persisted with actions/cache, so only
the first build of a Python-version series compiles casacore in full.

Dependency versions and locations are defined once in cibw_env.sh. The
Linux-only CXXFLAGS/LD_LIBRARY_PATH move into [tool.cibuildwheel.linux].

Closes casacore#232.
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