Skip to content

Commit 24b508f

Browse files
Fix CMAKE_PREFIX_PATH - inherit from workflow environment instead of using {project}
1 parent 4eefdd1 commit 24b508f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

pyproject-pypi.toml.j2

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,13 @@ build-frontend = "pip; args: --no-build-isolation"
265265
# Install build dependencies before building (since we disabled build isolation)
266266
before-build = """
267267
echo "Debug: CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH"
268-
echo "Debug: CMAKE_ARGS=$CMAKE_ARGS"
269-
echo "Debug: Checking if Ceres exists..."
270268
ls -la $CMAKE_PREFIX_PATH/lib/cmake/Ceres/ 2>/dev/null || echo "Ceres cmake dir not found"
271269
pip install scikit-build-core pybind11 setuptools-scm
272270
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
273271
"""
274-
# Pass CMAKE_PREFIX_PATH via environment and CMAKE_ARGS for scikit-build-core
275-
# The {project} placeholder is expanded by cibuildwheel
276-
# CMAKE_ARGS is explicitly passed to CMake by scikit-build-core
277-
environment = { CMAKE_PREFIX_PATH = "{project}/.pixi/envs/default", MOMENTUM_BUILD_WITH_FBXSDK = "OFF", CMAKE_ARGS = "-DCMAKE_PREFIX_PATH={project}/.pixi/envs/default" }
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" }
278275
279276
[tool.cibuildwheel.windows]
280277
# Disable build isolation to ensure CMAKE_PREFIX_PATH is properly passed to CMake
@@ -284,8 +281,7 @@ before-build = """
284281
pip install scikit-build-core pybind11 setuptools-scm
285282
pip install "torch>=2.8.0,<2.9" --index-url https://download.pytorch.org/whl/cpu
286283
"""
287-
# Pass CMAKE_PREFIX_PATH via environment and CMAKE_ARGS for scikit-build-core
288-
# The {project} placeholder is expanded by cibuildwheel
289-
# CMAKE_ARGS is explicitly passed to CMake by scikit-build-core
290-
environment = { CMAKE_PREFIX_PATH = "{project}/.pixi/envs/default", MOMENTUM_BUILD_WITH_FBXSDK = "OFF", CMAKE_ARGS = "-DCMAKE_PREFIX_PATH={project}/.pixi/envs/default" }
284+
# CMAKE_PREFIX_PATH is inherited from the workflow environment (set via $GITHUB_ENV)
285+
# Do NOT override it here - the {project} placeholder doesn't expand properly in environment values
286+
environment = { MOMENTUM_BUILD_WITH_FBXSDK = "OFF" }
291287
{% endif %}

0 commit comments

Comments
 (0)