Skip to content

Commit 8ade59a

Browse files
Pass through CMAKE_PREFIX_PATH using cibuildwheel's {env:VAR} syntax
1 parent a64cd45 commit 8ade59a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pyproject-pypi.toml.j2

Lines changed: 4 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-
# CMAKE_PREFIX_PATH is inherited from the workflow environment (set via $GITHUB_ENV)
273-
# Do NOT override it here - the {project} placeholder doesn't expand properly in environment values
274-
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
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" }
275274

276275
[tool.cibuildwheel.windows]
277276
# Disable build isolation to ensure CMAKE_PREFIX_PATH is properly passed to CMake
@@ -284,7 +283,6 @@ 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-
# CMAKE_PREFIX_PATH is inherited from the workflow environment (set via $GITHUB_ENV)
288-
# Do NOT override it here - the {project} placeholder doesn't expand properly in environment values
289-
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
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" }
290288
{% endif %}

0 commit comments

Comments
 (0)