Skip to content

Commit

Permalink
Fixed spec file in order to copy appropriate data files in the new py…
Browse files Browse the repository at this point in the history
…installer layout
  • Loading branch information
pauliyobo committed Sep 23, 2024
1 parent 3ace3ba commit c29ff24
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/builder/Bookworm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@


from pathlib import Path
import site

from PyInstaller.utils.hooks import collect_data_files, collect_submodules


Expand All @@ -23,10 +25,15 @@ BOOKWORM_RESOURCES = collect_data_files(
)
# alembic
root = Path("../../")
# pyxpdff_data searches for a file named default.xpdf in the site-packages directory
# We need to also include this as a data file
# TODO: Find a way to move this operation under pyxpdf_data
default_xpdf = Path(site.getsitepackages()[1]) / "default.xpdf"
DATA_FILES = [
(f"{root / 'alembic/env.py'}", 'alembic'),
(f"{root / 'alembic/versions/*'}", 'alembic/versions'),
(f"{root / 'alembic.ini'}", '.')
(f"{root / 'alembic.ini'}", '.'),
(f"{default_xpdf}", "lib/site-packages"),
]
DATA_FILES += [
(
Expand Down

0 comments on commit c29ff24

Please sign in to comment.