hook-backports.py 905 B

1234567891011121314151617181920
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2024 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. # Some of jaraco's backports packages (backports.functools-lru-cache, backports.tarfile) use pkgutil-style `backports`
  13. # namespace package, with `__init__.py` file that contains:
  14. #
  15. # __path__ = __import__('pkgutil').extend_path(__path__, __name__)
  16. #
  17. # This import via `__import__` function slips past PyInstaller's modulegraph analysis; so add a hidden import, in case
  18. # the user's program (and its dependencies) have no other direct imports of `pkgutil`.
  19. hiddenimports = ['pkgutil']