hook-scipy.special._ufuncs.py 1.2 KB

12345678910111213141516171819202122232425
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2013-2023, PyInstaller Development Team.
  3. #
  4. # Distributed under the terms of the GNU General Public License (version 2
  5. # or later) with exception for distributing the bootloader.
  6. #
  7. # The full license is in the file COPYING.txt, distributed with this software.
  8. #
  9. # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
  10. #-----------------------------------------------------------------------------
  11. from PyInstaller.utils.hooks import is_module_satisfies
  12. # Module scipy.io._ufunc depends on some other C/C++ extensions. The hidden import is necessary for SciPy 0.13+.
  13. # Thanks to dyadkin; see issue #826.
  14. hiddenimports = ['scipy.special._ufuncs_cxx']
  15. # SciPy 1.13.0 cythonized cdflib; this introduced new `scipy.special._cdflib` extension that is imported from the
  16. # `scipy.special._ufuncs` extension, and thus we need a hidden import here.
  17. if is_module_satisfies('scipy >= 1.13.0'):
  18. hiddenimports += ['scipy.special._cdflib']
  19. # SciPy 1.14.0 introduced `scipy.special._special_ufuncs`, which is imported from `scipy.special._ufuncs` extension.
  20. if is_module_satisfies('scipy >= 1.14.0'):
  21. hiddenimports += ['scipy.special._special_ufuncs']