hook-sysconfig.py 956 B

1234567891011121314151617181920212223
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2005-2021, 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. import sysconfig
  12. from PyInstaller.compat import is_win
  13. if not is_win and hasattr(sysconfig, '_get_sysconfigdata_name'):
  14. # Python 3.6 uses additional modules like
  15. # `_sysconfigdata_m_linux_x86_64-linux-gnu`, see
  16. # https://github.com/python/cpython/blob/3.6/Lib/sysconfig.py#L417
  17. # Note: Some versions of Anaconda backport this feature to before 3.6.
  18. # See issue #3105
  19. hiddenimports = [sysconfig._get_sysconfigdata_name()]