hook-compliance_checker.py 988 B

12345678910111213141516171819202122
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2022 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. from PyInstaller.utils.hooks import collect_submodules, copy_metadata, collect_data_files
  13. # Collect submodules to ensure that checker plugins are collected. but avoid collecting tests sub-package.
  14. hiddenimports = collect_submodules('compliance_checker', filter=lambda name: name != 'compliance_checker.tests')
  15. # Copy metadata, because checker plugins are discovered via entry-points
  16. datas = copy_metadata('compliance_checker')
  17. # Include data files from compliance_checker/data sub-directory.
  18. datas += collect_data_files('compliance_checker', includes=['data/**'])