Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Install libomp on macOS
if: runner.os == 'macOS'
run: brew install libomp
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.2
env:
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
archs = ["native"]
before-all = "brew install libomp"
environment = {MACOSX_DEPLOYMENT_TARGET = "15.0"}
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
repair-wheel-command = "delocate-wheel --exclude libomp --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"


[tool.cibuildwheel.windows]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def extra_link_args() -> List[str]:
extra_link_args = ["/openmp"]
elif sys.platform == "darwin":
_, lib_dir = _find_libomp()
extra_link_args = ["-lomp", f"-L{lib_dir}"]
extra_link_args = ["-lomp", f"-L{lib_dir}", f"-Wl,-rpath,{lib_dir}"]
else:
extra_link_args = ["-fopenmp"]

Expand Down Expand Up @@ -140,4 +140,4 @@ def generate_extensions(package_path, includes=[]):
packages=find_packages(where="src"),
package_dir={"": "src"},
ext_modules=ext_modules,
)
)
Loading