Skip to content

Commit 5e43af3

Browse files
Use $PWD for CMAKE_PREFIX_PATH in cibuildwheel environment
1 parent 8c30a98 commit 5e43af3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pyproject-pypi.toml.j2

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ ls -la $CMAKE_PREFIX_PATH/lib/cmake/Ceres/ 2>/dev/null || echo "Ceres cmake dir
269269
pip install scikit-build-core pybind11 setuptools-scm
270270
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
271271
"""
272-
# Pass through CMAKE_PREFIX_PATH from parent environment
273-
environment-pass = ["CMAKE_PREFIX_PATH"]
274-
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
272+
# Set CMAKE_PREFIX_PATH using $PWD which is available at build time
273+
environment = { CMAKE_PREFIX_PATH = "$PWD/.pixi/envs/default", MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
275274

276275
[tool.cibuildwheel.windows]
277276
# Disable build isolation to ensure CMAKE_PREFIX_PATH is properly passed to CMake
@@ -284,7 +283,7 @@ ls -la "$CMAKE_PREFIX_PATH/Library/lib/cmake/Ceres" 2>/dev/null || echo "Ceres c
284283
pip install scikit-build-core pybind11 setuptools-scm
285284
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
286285
"""
287-
# Pass through CMAKE_PREFIX_PATH from parent environment
288-
environment-pass = ["CMAKE_PREFIX_PATH"]
289-
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
286+
# Set CMAKE_PREFIX_PATH using $PWD which is available at build time
287+
# On Windows with conda-forge, cmake files are in Library/lib/cmake
288+
environment = { CMAKE_PREFIX_PATH = "$PWD/.pixi/envs/default", MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
290289
{% endif %}

0 commit comments

Comments
 (0)