hook-numcodecs.py 778 B

1234567891011121314151617181920
  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 is_module_satisfies
  13. # compat_ext is only imported from pyx files, so it is missed
  14. hiddenimports = ['numcodecs.compat_ext']
  15. # numcodecs v0.15.0 added an import of `deprecated` (from `Deprecated` dist) in one of its cythonized extension.
  16. if is_module_satisfies('numcodecs >= 0.15.0'):
  17. hiddenimports += ['deprecated']