Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Windows build #2322

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading