hook-platformdirs.py 839 B

123456789101112131415161718192021222324252627
  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.compat import is_darwin, is_win
  13. modules = ["platformdirs"]
  14. # platfromdirs contains dynamically loaded per-platform submodules.
  15. if is_darwin:
  16. modules.append("platformdirs.macos")
  17. elif is_win:
  18. modules.append("platformdirs.windows")
  19. else:
  20. # default to unix for all other platforms
  21. # this includes unix, cygwin, and msys2
  22. modules.append("platformdirs.unix")
  23. hiddenimports = modules