hook-babel.py 924 B

123456789101112131415161718192021222324
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2013-2023, PyInstaller Development Team.
  3. #
  4. # Distributed under the terms of the GNU General Public License (version 2
  5. # or later) with exception for distributing the bootloader.
  6. #
  7. # The full license is in the file COPYING.txt, distributed with this software.
  8. #
  9. # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
  10. #-----------------------------------------------------------------------------
  11. from PyInstaller.utils.hooks import collect_data_files
  12. # Ensure that .dat files from locale-data sub-directory are collected.
  13. datas = collect_data_files('babel')
  14. # Unpickling of locale-data/root.dat currently (babel v2.16.0) requires classes from following modules, so ensure that
  15. # they are always collected:
  16. hiddenimports = [
  17. "babel.dates",
  18. "babel.localedata",
  19. "babel.plural",
  20. "babel.numbers",
  21. ]