hook-iminuit.py 843 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. # add hooks for iminuit: https://github.com/scikit-hep/iminuit
  13. # iminuit imports subpackages through a cython module which aren't
  14. # found by default
  15. from PyInstaller.utils.hooks import collect_submodules
  16. hiddenimports = []
  17. # the iminuit package contains tests which aren't needed when distributing
  18. for mod in collect_submodules('iminuit'):
  19. if not mod.startswith('iminuit.tests'):
  20. hiddenimports.append(mod)