diff --git a/pyproject.toml b/pyproject.toml index e0c79d8..89381eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,4 +106,9 @@ test-command = "pytest --import-mode=importlib {project}/tests/test_castxml.py" # Build with Ninja instead of Visual Studio/MSBuild: much faster for LLVM, and # the superbuild switches its LLVM/Clang/CastXML builds to Ninja whenever it # finds ninja anyway. The workflow sets up the MSVC environment Ninja needs. -environment = { CMAKE_GENERATOR = "Ninja" } +# +# Build in a short directory at the drive root. The LLVM build nests deeply +# (FetchContent, then the superbuild's ExternalProjects), and under the default +# %TEMP%\cibw-sdist-*\castxml-\build\ its paths exceed what +# the MSVC tools can open (MAX_PATH), even with Windows long paths enabled. +environment = { CMAKE_GENERATOR = "Ninja", SKBUILD_BUILD_DIR = "C:/cxb" }