hook-text_unidecode.py 823 B

12345678910111213141516171819202122232425
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2020 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. # -----------------------------------------------------------------------------
  13. """
  14. text-unidecode:
  15. https://github.com/kmike/text-unidecode/
  16. """
  17. import os
  18. from PyInstaller.utils.hooks import get_package_paths
  19. package_path = get_package_paths("text_unidecode")
  20. data_bin_path = os.path.join(package_path[1], "data.bin")
  21. if os.path.exists(data_bin_path):
  22. datas = [(data_bin_path, 'text_unidecode')]