Skip to content

Commit b3edc5b

Browse files
ShinobiFPVclaude
andcommitted
ci: pin Python 3.11 for node-gyp (distutils removed in 3.12+)
windows-2022's default Python is 3.12+, which dropped distutils from the standard library. node-gyp's bundled gyp still imports it directly ("ModuleNotFoundError: No module named 'distutils'") rebuilding node-pty. 3.11 is the last version that has it built in. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 5691517 commit b3edc5b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
with:
2525
node-version: 22
2626

27+
# node-gyp's bundled gyp still imports distutils, which Python 3.12+
28+
# dropped from the standard library — pin 3.11 so rebuilding node-pty
29+
# doesn't die with "ModuleNotFoundError: No module named 'distutils'".
30+
- uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.11'
33+
2734
- run: npm ci
2835

2936
- run: npm run release:publish

0 commit comments

Comments
 (0)