1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-06 00:47:13 +03:00
WeasyPrint/.github/workflows/exe.yml
Guillaume Ayoub 10b623c1d4 Manually include VARC table module in pyinstaller modules
fontTools only imports this module with __import__, that’s why it’s not
automatically found.
2024-05-27 09:04:02 +02:00

35 lines
1.3 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: WeasyPrints exe generation
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 . pyinstaller
- name: Generate executable
run: python -m PyInstaller weasyprint/__main__.py -n weasyprint -F --hidden-import "fontTools.ttLib.tables.V_A_R_C_"
- name: Test executable
run: dist/weasyprint --info
- name: Store executable
uses: actions/upload-artifact@v4
with:
name: weasyprint-windows
path: |
dist/weasyprint
dist/weasyprint.exe
README.rst
LICENSE