From b4b0c723f58e6cf53e9aedaea63ed842805b6b83 Mon Sep 17 00:00:00 2001 From: "junam.song" Date: Wed, 22 Apr 2026 16:15:46 +0900 Subject: [PATCH] build: add torch to build-system.requires scikit-build-core's isolated build env runs CMakeLists.txt which calls find_package(Torch CONFIG REQUIRED). The Torch CMake package ships inside the installed PyTorch Python package (torch/share/cmake/Torch/ TorchConfig.cmake), so torch must be importable in the build env. Without listing torch in [build-system].requires, any clean `pip install git+https://github.com/tatsy/torchmcubes.git` fails with CMake Error at CMakeLists.txt:43 (find_package): Could not find a package configuration file provided by "Torch" Adding torch here makes the install work in isolated build environments without requiring --no-build-isolation or manually pre-installing torch. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a80e71..11e0694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ license-files = ["LICENSE"] exclude = ["**/.mypy_cache/**", "**/build/**", "**/.vscode/**"] [build-system] -requires = ["scikit-build-core>=0.10", "pybind11>=2.10", "cmake", "ninja"] +requires = ["scikit-build-core>=0.10", "pybind11>=2.10", "cmake", "ninja", "torch"] build-backend = "scikit_build_core.build" [tool.isort]