Skip to content

Commit f3508fa

Browse files
Windows: Set CMAKE_PREFIX_PATH in before-build script using command substitution
1 parent 5e43af3 commit f3508fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pyproject-pypi.toml.j2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,15 @@ environment = { CMAKE_PREFIX_PATH = "$PWD/.pixi/envs/default", MOMENTUM_BUILD_WI
277277
build-frontend = "pip; args: --no-build-isolation"
278278
# Install build dependencies before building (since we disabled build isolation)
279279
# Note: cibuildwheel runs before-build scripts in bash even on Windows, so use bash syntax
280+
# We set CMAKE_PREFIX_PATH here because $PWD doesn't expand in the environment config on Windows
280281
before-build = """
282+
export CMAKE_PREFIX_PATH="$(pwd)/.pixi/envs/default"
281283
echo "Debug: CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH"
282284
ls -la "$CMAKE_PREFIX_PATH/Library/lib/cmake/Ceres" 2>/dev/null || echo "Ceres cmake dir not found"
283285
pip install scikit-build-core pybind11 setuptools-scm
284286
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
285287
"""
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" }
288+
# On Windows, do NOT set CMAKE_PREFIX_PATH here - $PWD doesn't expand properly
289+
# Instead, we export it in before-build script above
290+
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
289291
{% endif %}

0 commit comments

Comments
 (0)