Skip to content

fix: make OpenMP optional and add macOS wheel builds - #44

Open
f-dy wants to merge 1 commit into
danini:masterfrom
f-dy:fix/openmp-optional
Open

fix: make OpenMP optional and add macOS wheel builds#44
f-dy wants to merge 1 commit into
danini:masterfrom
f-dy:fix/openmp-optional

Conversation

@f-dy

@f-dy f-dy commented May 29, 2026

Copy link
Copy Markdown

Description

Make OpenMP optional so the package can be pip-installed on macOS (where Apple clang does not bundle OpenMP).

Changes

  • CMakeLists.txt: Auto-detect Homebrew's libomp on macOS via brew --prefix libomp. If OpenMP is still not found, warn and continue without it (graceful degradation, matching scikit-learn's approach).
  • CI (.github/workflows/build-and-deploy.yml): Add macos-latest to the wheel build matrix with brew install libomp, so published macOS wheels include OpenMP support.

For users building from source on macOS

brew install libomp
pip install .

OpenMP will be auto-detected. Without libomp, the build succeeds but runs single-threaded.

Testing

  • pip install . succeeds on macOS with and without libomp installed
  • With libomp: OpenMP is detected and enabled
  • Without libomp: warning printed, build continues without OpenMP

- CMakeLists.txt: Auto-detect Homebrew libomp on macOS. If OpenMP is
  not found, warn and continue without it (graceful degradation).
- CI: Add macos-latest to the wheel build matrix with libomp installed,
  so macOS wheels ship with OpenMP support.

On macOS, install libomp for OpenMP support:
  brew install libomp
@f-dy
f-dy marked this pull request as ready for review May 29, 2026 12:04
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