Skip to content

Commit 7e37085

Browse files
committed
fix: keep Python include headers for vllm-metal Metal kernel compilation
vllm-metal v0.2.0 compiles Metal kernels at runtime and needs the Python 3.12 include headers. Instead of removing the entire include/ directory, only remove non-Python entries to keep the tarball as small as possible.
1 parent 6c5c109 commit 7e37085

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/build-vllm-metal-tarball.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ rm -f vllm_metal-*.whl
7272

7373
# Strip files not needed at runtime to reduce tarball size
7474
echo "Stripping unnecessary files..."
75-
rm -rf "$PYTHON_DIR/include"
75+
# Keep include/python3.12 (needed by vllm-metal to compile Metal kernels at runtime)
76+
find "$PYTHON_DIR/include" -mindepth 1 -maxdepth 1 ! -name 'python3.12' -exec rm -rf {} + 2>/dev/null || true
7677
rm -rf "$PYTHON_DIR/share"
7778
PYLIB="$PYTHON_DIR/lib/python3.12"
7879
rm -rf "$PYLIB/test" "$PYLIB/tests"

0 commit comments

Comments
 (0)