diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff827e0..cf746a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,7 @@ jobs: cmake -S . -B build -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DKTIR_ENABLE_PYTHON_BINDINGS=ON \ + -DMLIR_PYTHON_STUBGEN_ENABLED=ON \ -DPython3_EXECUTABLE=${{ env.PYTHON }} \ -DPython_EXECUTABLE=${{ env.PYTHON }} \ -DMLIR_DIR=${{ env.MLIR_DIR }} \ diff --git a/pyproject.toml b/pyproject.toml index cc132c1..4d59de3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,10 @@ [build-system] -requires = ["scikit-build-core", "nanobind>=2.12.0"] +# cmake>=4.0 is required: CMake 3.x writes the full target name into the +# file-API reply filename, and MLIR's mlir_generate_type_stubs() builds a +# 283-char target name by joining DEPENDS_TARGETS. That overflows NAME_MAX +# (255), so scikit-build-core fails with ENAMETOOLONG while reading the +# reply. CMake 4.0.0 truncates the name and relies on the trailing hash. +requires = ["scikit-build-core", "nanobind>=2.12.0", "cmake>=4.0", "ninja>=1.11"] build-backend = "scikit_build_core.build" [project] @@ -31,7 +36,7 @@ MLIR_PYTHON_STUBGEN_ENABLED = "ON" [dependency-groups] # Base build tools for all LLVM builds (stable and nightly). -llvm-build = ["cmake", "ninja", "sccache"] +llvm-build = ["cmake>=4.0", "ninja>=1.11", "sccache>=0.8"] # numpy<2 is additionally required by check-mlir's Python test suite (nightly only). # numpy 2.x causes a dense-element ABI mismatch with MLIR at this LLVM version. # Stable builds skip check-mlir, so they use llvm-build directly. diff --git a/uv.lock b/uv.lock index 0424188..f494468 100644 --- a/uv.lock +++ b/uv.lock @@ -63,15 +63,15 @@ provides-extras = ["test"] [package.metadata.requires-dev] llvm-build = [ - { name = "cmake" }, - { name = "ninja" }, - { name = "sccache" }, + { name = "cmake", specifier = ">=4.0" }, + { name = "ninja", specifier = ">=1.11" }, + { name = "sccache", specifier = ">=0.8" }, ] llvm-build-nightly = [ - { name = "cmake" }, - { name = "ninja" }, + { name = "cmake", specifier = ">=4.0" }, + { name = "ninja", specifier = ">=1.11" }, { name = "numpy", specifier = "<2" }, - { name = "sccache" }, + { name = "sccache", specifier = ">=0.8" }, ] [[package]]