hook-fiona.py 860 B

1234567891011121314151617181920212223242526
  1. # ------------------------------------------------------------------
  2. # Copyright (c) 2021 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, is_module_satisfies
  13. hiddenimports = [
  14. "fiona._shim",
  15. "fiona.schema",
  16. "json",
  17. ]
  18. # As of fiona 1.9.0, `fiona.enums` is also a hidden import, made in cythonized `fiona.crs`.
  19. if is_module_satisfies("fiona >= 1.9.0"):
  20. hiddenimports.append("fiona.enums")
  21. # Collect data files that are part of the package (e.g., projections database)
  22. datas = collect_data_files("fiona")