hook-webbrowser.py 1006 B

12345678910111213141516171819202122
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2005-2026, 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 sys
  12. excludedimports = []
  13. # Avoid collecting `_ios_support`, which in turn triggers unnecessary collection of `libobjc` shared library if the
  14. # latter happens to be available on the build system.
  15. # See https://github.com/pyinstaller/pyinstaller/issues/9333, as well as
  16. # https://github.com/python/cpython/blob/v3.13.0/Lib/webbrowser.py#L621-L625
  17. # and
  18. # https://github.com/python/cpython/blob/v3.13.0/Lib/_ios_support.py#L13
  19. if sys.platform != 'ios':
  20. excludedimports += ["_ios_support"]