hook-z3c.rml.py 959 B

12345678910111213141516171819202122232425
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2023 PyInstaller Development Team.
  3. #
  4. # This file is distributed under the terms of the GNU General Public
  5. # License (version 2.0 or later).
  6. #
  7. # The full license is available in LICENSE, distributed with
  8. # this software.
  9. #
  10. # SPDX-License-Identifier: GPL-2.0-or-later
  11. # ------------------------------------------------------------------
  12. from PyInstaller.utils.hooks import collect_data_files
  13. # `z3c.rml` uses Bitstream Vera TTF fonts from the `reportlab` package. As that package can be used without the bundled
  14. # fonts and as some of the bundled fonts have restrictive license (e.g., DarkGarden), we collect the required subset
  15. # of fonts here, instead of collecting them all in a hook for `reportlab`.
  16. datas = collect_data_files(
  17. "reportlab",
  18. includes=[
  19. "fonts/00readme.txt",
  20. "fonts/bitstream-vera-license.txt",
  21. "fonts/Vera*.ttf",
  22. ],
  23. )