Skip to content

Commit

Permalink
hooks: add hook for metpy
Browse files Browse the repository at this point in the history
Basic hook that collects metadata and data files.
  • Loading branch information
rokm committed Apr 27, 2021
1 parent 1aad426 commit fb65713
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/60.new.rst
@@ -0,0 +1 @@
Add hook for ``metpy``.
20 changes: 20 additions & 0 deletions 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')

0 comments on commit fb65713

Please sign in to comment.