hook-azurerm.py 838 B

12345678910111213141516171819202122
  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. # Azurerm is a lite api to microsoft azure.
  13. # Azurerm is using pkg_resources internally which is not supported by py-installer.
  14. # This hook will collect the module metadata.
  15. # Tested with Azurerm 0.10.0
  16. from PyInstaller.utils.hooks import copy_metadata, is_module_satisfies
  17. if is_module_satisfies("pyinstaller >= 4.4"):
  18. datas = copy_metadata("azurerm", recursive=True)
  19. else:
  20. datas = copy_metadata("azurerm")