hook-bokeh.py 922 B

123456789101112131415161718192021222324252627
  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. from PyInstaller.utils.hooks import collect_data_files, copy_metadata, is_module_satisfies
  13. # core/_templates/*
  14. # server/static/**/*
  15. # subcommands/*.py
  16. # bokeh/_sri.json
  17. datas = collect_data_files('bokeh.core') + \
  18. collect_data_files('bokeh.server') + \
  19. collect_data_files('bokeh.command.subcommands', include_py_files=True) + \
  20. collect_data_files('bokeh')
  21. # bokeh >= 3.0.0 sets its __version__ from metadata
  22. if is_module_satisfies('bokeh >= 3.0.0'):
  23. datas += copy_metadata('bokeh')