-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a hook for `z3c.rml` that collects the required subset of TTF fonts bundled with `reportlab` package. The latter might be used without its bundled fonts, and some of them have restrictive license (e.g., DarkGarden), so instead of having a hook for `reportlab` that collects all fonts fron `reportlab.fonts`, we collect the required subset (Bitstream Vera fonts) in the `z3c.rml` hook.
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add a hook for ``z3c.rml`` that collects the required subset of Bitstream | ||
Vera TTF fonts from the ``reportlab`` package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-z3c.rml.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# ------------------------------------------------------------------ | ||
# Copyright (c) 2023 PyInstaller Development Team. | ||
# | ||
# This file is distributed under the terms of the GNU General Public | ||
# License (version 2.0 or later). | ||
# | ||
# The full license is available in LICENSE.GPL.txt, distributed with | ||
# this software. | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
# ------------------------------------------------------------------ | ||
|
||
from PyInstaller.utils.hooks import collect_data_files | ||
|
||
# `z3c.rml` uses Bitstream Vera TTF fonts from the `reportlab` package. As that package can be used without the bundled | ||
# fonts and as some of the bundled fonts have restrictive license (e.g., DarkGarden), we collect the required subset | ||
# of fonts here, instead of collecting them all in a hook for `reportlab`. | ||
datas = collect_data_files( | ||
"reportlab", | ||
includes=[ | ||
"fonts/00readme.txt", | ||
"fonts/bitstream-vera-license.txt", | ||
"fonts/Vera*.ttf", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters