Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jul 11, 2024
1 parent 61852c4 commit 0a63273
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 155 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/doconfly.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/exe.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/test_samples.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/tests.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/win-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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="libharfbuzz-subset-0.dll;libharfbuzz-0.dll;libpango-1.0-0.dll;libgobject-2.0-0.dll;libfontconfig-1.dll;libpangoft2-1.0-0.dll" "dist/weasyprint-62.3-py3-none-any.whl"
- name: List dependencies
run: |
python -m delvewheel needed "C:\msys64\mingw64\bin\libharfbuzz-subset-0.dll"
python -m delvewheel needed "C:\msys64\mingw64\bin\libharfbuzz-0.dll"
python -m delvewheel needed "C:\msys64\mingw64\bin\libpango-1.0-0.dll"
python -m delvewheel needed "C:\msys64\mingw64\bin\libgobject-2.0-0.dll"
python -m delvewheel needed "C:\msys64\mingw64\bin\libfontconfig-1.dll"
python -m delvewheel needed "C:\msys64\mingw64\bin\libpangoft2-1.0-0.dll"
- name: Store wheel
uses: actions/upload-artifact@v4
with:
name: weasyprint-windows
path: |
wheelhouse/weasyprint-62.3-py3-none-any.whl

0 comments on commit 0a63273

Please sign in to comment.