Bundle Pillow so the frozen binary can build PDF reports

reportlab imports PIL lazily and it was in the PyInstaller excludes list,
so report generation crashed in the packaged binary.
This commit is contained in:
Jonathan Singer
2026-07-20 12:23:06 -04:00
parent a12b9c634c
commit e32bfcde4a
+5 -1
View File
@@ -206,6 +206,11 @@ hiddenimports += collect_submodules('reportlab')
# reportlab ships bundled fonts (.pfb/.afm) it needs at runtime.
datas += collect_data_files('reportlab')
# reportlab imports PIL (pillow) lazily for image handling, so it must be
# bundled explicitly and kept out of the excludes list below.
hiddenimports += collect_submodules('PIL')
datas += collect_data_files('PIL')
excludes = [
# Sandbox-only packages
'playwright',
@@ -252,7 +257,6 @@ excludes = [
'numpy',
'pandas',
'scipy',
'PIL',
'cv2',
]