Skip to content

Commit e2cc68c

Browse files
committed
Update Pyproject.toml and build to include FFI headers
1 parent 933ac2a commit e2cc68c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ if(CMAKE_CUDA_COMPILER)
3232
find_package(Python 3.8
3333
REQUIRED COMPONENTS Interpreter Development.Module
3434
OPTIONAL_COMPONENTS Development.SABIModule)
35-
set(XLA_DIR ${Python_SITELIB}/jaxlib/include)
36-
message(STATUS "XLA_DIR: ${XLA_DIR}")
35+
execute_process(
36+
COMMAND "${Python_EXECUTABLE}"
37+
"-c" "from jax.extend import ffi; print(ffi.include_dir())"
38+
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE XLA_DIR)
39+
message(STATUS "XLA include directory: ${XLA_DIR}")
3740

3841
# Detect the installed nanobind package and import it into CMake
3942
find_package(nanobind CONFIG REQUIRED)

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
requires = [
33
"setuptools",
44
"setuptools-scm",
5-
"scikit-build-core >=0.4.3",
6-
"nanobind >=1.3.2"
5+
"scikit-build-core >=0.11",
6+
"nanobind >=2.0,<2.6",
7+
"jax >= 0.4.0"
78
]
89
build-backend = "scikit_build_core.build"
910

@@ -78,11 +79,12 @@ tests = [
7879

7980
[tool.scikit-build]
8081
# Protect the configuration against future changes in scikit-build-core
81-
minimum-version = "0.4"
82+
minimum-version = "0.8"
8283
# Setuptools-style build caching in a local directory
8384
build-dir = "build/{wheel_tag}"
8485
# Build stable ABI wheels for CPython 3.12+
8586
wheel.py-api = "cp312"
87+
cmake.build-type = "Release"
8688
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
8789
sdist.include = ["s2fft/_version.py"]
8890

0 commit comments

Comments
 (0)