hook-apscheduler.py 958 B

123456789101112131415161718192021222324252627
  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. APScheduler uses entry points to dynamically load executors, job
  14. stores and triggers.
  15. This hook was tested against APScheduler 3.6.3.
  16. """
  17. from PyInstaller.utils.hooks import (collect_submodules, copy_metadata,
  18. is_module_satisfies)
  19. if is_module_satisfies("apscheduler < 4"):
  20. if is_module_satisfies("pyinstaller >= 4.4"):
  21. datas = copy_metadata('APScheduler', recursive=True)
  22. else:
  23. datas = copy_metadata('APScheduler')
  24. hiddenimports = collect_submodules('apscheduler')