Skip to content

Commit 0757f80

Browse files
linesightclaude
andcommitted
Rewrite build_distrib.py to package pre-built artifacts into a wheel
The old script searched for multiple Python installations and drove a full build + setup.py bdist_wheel — all of that is now the CI matrix's job. The new build_distrib.py does the one thing that still belongs here: package the pre-built cefpython3/ directory into a .whl using stdlib only (zipfile/hashlib), with correct dist-info/RECORD hashes. The CI wheel job now mirrors the test job (checkout, setup-python, download artifact, copy, build_distrib.py). Timeout drops 60 -> 15 min. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3fd83d4 commit 0757f80

2 files changed

Lines changed: 110 additions & 695 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
wheel:
114114
needs: test
115115
runs-on: windows-latest
116-
timeout-minutes: 60
116+
timeout-minutes: 15
117117
strategy:
118118
fail-fast: false
119119
matrix:
@@ -127,33 +127,21 @@ jobs:
127127
uses: actions/setup-python@v5
128128
with:
129129
python-version: ${{ matrix.python-version }}
130-
cache: 'pip'
131-
132-
- name: Read CEF version
133-
id: cef-version
134-
run: |
135-
$ver = (Select-String -Path src/version/cef_version_win.h `
136-
-Pattern '#define CEF_VERSION "([^"]+)"').Matches[0].Groups[1].Value
137-
echo "value=$ver" >> $env:GITHUB_OUTPUT
138130

139-
- name: Cache CEF binaries
140-
uses: actions/cache@v4
141-
if: ${{ inputs.bypass_cache != true }}
131+
- name: Download build artifacts
132+
uses: actions/download-artifact@v4
142133
with:
143-
path: build/cef_binary_*
144-
key: cef-windows64-${{ steps.cef-version.outputs.value }}
145-
146-
- name: Install build tools
147-
run: python tools/requirements.py
148-
149-
- name: Download CEF binaries
150-
run: python tools/download_cef.py
134+
name: build-py${{ matrix.python-version }}-win64
135+
path: build/artifacts/
151136

152-
- name: Prepare prebuilt CEF
153-
run: python tools/automate.py --prebuilt-cef
137+
- name: Set up cefpython3 package
138+
run: |
139+
Get-ChildItem build/artifacts/ | ForEach-Object {
140+
Copy-Item $_.FullName cefpython3/ -Recurse -Force
141+
}
154142
155143
- name: Build wheel
156-
run: pip wheel --no-build-isolation -w build/dist .
144+
run: python tools/build_distrib.py
157145

158146
- name: Upload wheel artifact
159147
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)