Skip to content

Commit f484930

Browse files
authored
Add Python 3.12 to wheel build matrix (#9)
## Summary - Adds Python 3.12 (3.12.8) to the `PYTHON_VERSIONS` default in `deploy/build_wheels.sh` - Adds compile-from-source block for 3.12, following the same pattern as 3.10/3.11 ## Test plan - [ ] Kick off Jenkins build with this branch to verify 3.12 wheels build for both x86_64 and aarch64 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent ad3764f commit f484930

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

deploy/build_wheels.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ "$(basename $(pwd))" = "deploy" ]; then
77
fi
88

99
UNITREE_TAG=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
10-
PYTHON_VERSIONS=${PYTHON_VERSIONS:-"3.8 3.10 3.11"}
10+
PYTHON_VERSIONS=${PYTHON_VERSIONS:-"3.8 3.10 3.11 3.12"}
1111
ARCHITECTURES=${ARCHITECTURES:-"x86_64 aarch64"}
1212

1313
echo "Building wheels for Python versions: $PYTHON_VERSIONS"
@@ -69,6 +69,16 @@ RUN if [ "\$PYTHON_VER" = "3.8" ]; then \\
6969
make altinstall && \\
7070
ln -sf /usr/local/bin/python3.11 /usr/bin/python3.11 && \\
7171
cd / && rm -rf /tmp/Python-3.11.9*; \\
72+
elif [ "\$PYTHON_VER" = "3.12" ]; then \\
73+
cd /tmp && \\
74+
wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz && \\
75+
tar xzf Python-3.12.8.tgz && \\
76+
cd Python-3.12.8 && \\
77+
./configure --enable-optimizations --prefix=/usr/local && \\
78+
make -j\$(nproc) && \\
79+
make altinstall && \\
80+
ln -sf /usr/local/bin/python3.12 /usr/bin/python3.12 && \\
81+
cd / && rm -rf /tmp/Python-3.12.8*; \\
7282
fi
7383
7484
RUN python\$PYTHON_VER -m pip install --upgrade pip setuptools wheel build pybind11

0 commit comments

Comments
 (0)