Skip to content

Commit 172d04f

Browse files
committed
[CI] Set Python3_ROOT_DIR for torchcodec CMake build
CMake's FindPython3 can't locate Python include headers in uv's standalone Python installation. Setting Python3_ROOT_DIR to the base prefix lets CMake find the development files. Made-with: Cursor
1 parent 3b9d2e8 commit 172d04f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/unittest/linux/scripts/run_all.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,10 @@ fi
242242
# install torchcodec (from source for nightly to match PyTorch ABI)
243243
if [[ "$RELEASE" == 0 ]]; then
244244
export BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1
245+
export Python3_ROOT_DIR="$(python -c 'import sys; print(sys.base_prefix)')"
245246
uv_pip_install --no-build-isolation git+https://github.com/meta-pytorch/torchcodec.git
246247
unset BUILD_AGAINST_ALL_FFMPEG_FROM_S3
248+
unset Python3_ROOT_DIR
247249
else
248250
uv_pip_install torchcodec
249251
fi

0 commit comments

Comments
 (0)