Skip to content

Commit

Permalink
Merge pull request #2322 from Kozea/windows-build
Browse files Browse the repository at this point in the history
Improve Windows build
  • Loading branch information
liZe authored Dec 9, 2024
2 parents 003ff42 + df39db3 commit 3c6f9a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- 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_"
run: python -m PyInstaller weasyprint/__main__.py -n weasyprint -F
- name: Test executable
run: dist/weasyprint --info
- name: Store executable
Expand Down
3 changes: 2 additions & 1 deletion weasyprint/text/ffi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Imports of dynamic libraries used for text layout."""

import os
import sys
from contextlib import suppress

import cffi
Expand Down Expand Up @@ -434,7 +435,7 @@ def _dlopen(ffi, *names, allow_fail=False):
return ffi.dlopen(names[0], flags) # pragma: no cover


if hasattr(os, 'add_dll_directory'): # pragma: no cover
if hasattr(os, 'add_dll_directory') and not hasattr(sys, 'frozen'): # pragma: no cover
dll_directories = os.getenv(
'WEASYPRINT_DLL_DIRECTORIES',
'C:\\msys64\\mingw64\\bin;'
Expand Down

0 comments on commit 3c6f9a5

Please sign in to comment.