Skip to content

fix wheel/sdist build #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
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
10 changes: 9 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "*"
pull_request:

jobs:
build_wheels:
Expand All @@ -20,6 +21,13 @@ jobs:
fetch-depth: 0
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.3
env:
# from https://github.com/flatironinstitute/finufft/blob/master/.github/workflows/build_finufft_wheels.yml
CIBW_ENVIRONMENT_MACOS: >
CC=$(brew --prefix llvm)/bin/clang
CXX=$(brew --prefix llvm)/bin/clang++
CFLAGS="-I$(brew --prefix libomp)/include"
LDFLAGS="-L$(brew --prefix libomp)/lib"
- uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}
Expand All @@ -37,7 +45,7 @@ jobs:
- name: Build sdist
run: uv build --sdist
- name: Check the sdist
run: python -m twine check dist/*.tar.gz
run: uvx twine check dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: sdist
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ endif()
# Build the CPU XLA bindings
nanobind_add_module(jax_finufft_cpu ${CMAKE_CURRENT_LIST_DIR}/lib/jax_finufft_cpu.cc)
target_link_libraries(jax_finufft_cpu PRIVATE finufft)

if (NOT FFTW_INCLUDE_DIRS)
get_target_property(FFTW_INCLUDE_DIRS fftw3 INTERFACE_INCLUDE_DIRECTORIES)
endif()

target_include_directories(jax_finufft_cpu PRIVATE ${FFTW_INCLUDE_DIRS})
install(TARGETS jax_finufft_cpu LIBRARY DESTINATION .)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config-settings = {"cmake.define.FINUFFT_ARCH_FLAGS" = ""}
before-all = "yum install -y fftw-devel"

[tool.cibuildwheel.macos]
before-all = "brew install fftw"
before-all = "brew install llvm libomp"

# Needed for full C++17 support
[tool.cibuildwheel.macos.environment]
Expand Down
Loading