Skip to content

Commit 8c30a98

Browse files
Use cibuildwheel environment-pass to inherit CMAKE_PREFIX_PATH
1 parent 8ade59a commit 8c30a98

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pyproject-pypi.toml.j2

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ 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-
# Explicitly pass through CMAKE_PREFIX_PATH from workflow environment using {env:VAR} syntax
273-
environment = { CMAKE_PREFIX_PATH = "{env:CMAKE_PREFIX_PATH}", MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
272+
# Pass through CMAKE_PREFIX_PATH from parent environment
273+
environment-pass = ["CMAKE_PREFIX_PATH"]
274+
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
274275

275276
[tool.cibuildwheel.windows]
276277
# Disable build isolation to ensure CMAKE_PREFIX_PATH is properly passed to CMake
@@ -283,6 +284,7 @@ ls -la "$CMAKE_PREFIX_PATH/Library/lib/cmake/Ceres" 2>/dev/null || echo "Ceres c
283284
pip install scikit-build-core pybind11 setuptools-scm
284285
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
285286
"""
286-
# Explicitly pass through CMAKE_PREFIX_PATH from workflow environment using {env:VAR} syntax
287-
environment = { CMAKE_PREFIX_PATH = "{env:CMAKE_PREFIX_PATH}", MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
287+
# Pass through CMAKE_PREFIX_PATH from parent environment
288+
environment-pass = ["CMAKE_PREFIX_PATH"]
289+
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
288290
{% endif %}

0 commit comments

Comments
 (0)