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 Sep 10, 2021
1 parent 1050979 commit af87498
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/60.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook for ``metpy``.
21 changes: 21 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-metpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ------------------------------------------------------------------
# Copyright (c) 2021 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 or, in newer
# versions, importlib.metadata.version(__package__)
datas = copy_metadata('metpy')

# Collect data files
datas += collect_data_files('metpy')

0 comments on commit af87498

Please sign in to comment.