This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: WeasyPrint’s wheel for Windows | |
on: [push] | |
jobs: | |
generate: | |
name: ${{ matrix.os }} | |
runs-on: 'windows-2019' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Use absolute imports and install Pango (Windows) | |
run: | | |
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-pango mingw-w64-x86_64-sed --noconfirm' | |
C:\msys64\mingw64\bin\sed -i 's/^from \. /from weasyprint /' weasyprint/__main__.py | |
C:\msys64\mingw64\bin\sed -i 's/^from \./from weasyprint\./' weasyprint/__main__.py | |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH | |
rm C:\msys64\mingw64\bin\python.exe | |
- name: Install requirements | |
run: python -m pip install . flit delvewheel | |
- name: Generate wheel | |
run: python -m flit build | |
- name: Include Harfbuzz DLL | |
run: python -m delvewheel repair --add-path="C:\msys64\mingw64\bin" --add-dll="harfbuzz-subset" "dist/weasyprint-62.3-py3-none-any.whl" | |
- name: Include dependencies | |
run: python -m delvewheel repair --add-path="C:\msys64\mingw64\bin" |