hook-nvidia.cuda_nvcc.py 1.3 KB

123456789101112131415161718192021222324252627282930
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2023 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 collect_data_files
  13. from _pyinstaller_hooks_contrib.utils.nvidia_cuda import (
  14. collect_nvidia_cuda_binaries,
  15. create_symlink_suppression_patterns,
  16. )
  17. # Ensures that versioned .so files are collected
  18. binaries = collect_nvidia_cuda_binaries(__file__)
  19. # Prevent binary dependency analysis from creating symlinks to top-level application directory for shared libraries
  20. # from this package. Requires PyInstaller >= 6.11.0; no-op in earlier versions.
  21. bindepend_symlink_suppression = create_symlink_suppression_patterns(__file__)
  22. # Collect additional resources:
  23. # - ptxas executable (which strictly speaking, should be collected as a binary)
  24. # - nvvm/libdevice/libdevice.10.bc file
  25. # - C headers; assuming ptxas requires them - if that is not the case, we could filter them out.
  26. datas = collect_data_files('nvidia.cuda_nvcc')