hook-pycparser.py 875 B

1234567891011121314151617181920212223
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2020 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. # pycparser needs two modules -- lextab.py and yacctab.py -- which it
  13. # generates at runtime if they cannot be imported.
  14. #
  15. # Those modules are written to the current working directory for which
  16. # the running process may not have write permissions, leading to a runtime
  17. # exception.
  18. #
  19. # This hook tells pyinstaller about those hidden imports, avoiding the
  20. # possibility of such runtime failures.
  21. hiddenimports = ['pycparser.lextab', 'pycparser.yacctab']