hook-parsedatetime.py 844 B

1234567891011121314151617181920212223242526272829
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2005-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. Fixes https://github.com/pyinstaller/pyinstaller/issues/4995
  14. Modules under parsedatetime.pdt_locales.* are lazily loaded using __import__.
  15. But they are conviniently listed in parsedatetime.pdt_locales.locales.
  16. Tested on versions:
  17. - 1.1.1
  18. - 1.5
  19. - 2.0
  20. - 2.6 (latest)
  21. """
  22. from PyInstaller.utils.hooks import collect_submodules
  23. hiddenimports = collect_submodules("parsedatetime.pdt_locales")