diff --git a/news/60.new.rst b/news/60.new.rst new file mode 100644 index 000000000..5e80f05c3 --- /dev/null +++ b/news/60.new.rst @@ -0,0 +1 @@ +Add hook for ``metpy``. diff --git a/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-metpy.py b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-metpy.py new file mode 100644 index 000000000..da9902058 --- /dev/null +++ b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-metpy.py @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------ +# Copyright (c) 2020 PyInstaller Development Team. +# +# This file is distributed under the terms of the GNU General Public +# License (version 2.0 or later). +# +# The full license is available in LICENSE.GPL.txt, distributed with +# this software. +# +# SPDX-License-Identifier: GPL-2.0-or-later +# ------------------------------------------------------------------ + +from PyInstaller.utils.hooks import copy_metadata, collect_data_files + +# MetPy requires metadata, because it queries its version via +# pkg_resources.get_distribution(__package__).version +datas = copy_metadata('metpy') + +# Collect data files +datas += collect_data_files('metpy')