hook-gevent.py 1011 B

123456789101112131415161718192021222324
  1. #-----------------------------------------------------------------------------
  2. # Copyright (c) 2015-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. from PyInstaller.utils.hooks import collect_all, copy_metadata
  12. excludedimports = ["gevent.testing", "gevent.tests"]
  13. datas, binaries, hiddenimports = collect_all(
  14. 'gevent',
  15. filter_submodules=lambda name: ("gevent.testing" not in name or "gevent.tests" not in name),
  16. include_py_files=False,
  17. exclude_datas=["**/tests"]
  18. )
  19. # Gevent uses ``pkg_resources.require("...")``, which means that all its dependencies must also have their metadata.
  20. datas += copy_metadata('gevent', recursive=True)