Skip to content

Commit

Permalink
Add hook for tzwhere (#771)
Browse files Browse the repository at this point in the history
Add a hook for `tzwhere`, which has data files.
  • Loading branch information
davetapley authored and bwoodsend committed Aug 4, 2024
1 parent c0d694c commit 39e1cdd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions _pyinstaller_hooks_contrib/stdhooks/hook-tzwhere.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# Copyright (c) 2024 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, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files('tzwhere')
1 change: 1 addition & 0 deletions news/772.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``tzwhere``, which has data files.
8 changes: 8 additions & 0 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2121,3 +2121,11 @@ def test_cmocean(pyi_builder):
pyi_builder.test_source("""
import cmocean
""")


@importorskip('tzwhere')
def test_tzwhere(pyi_builder):
pyi_builder.test_source("""
from tzwhere import tzwhere
tzwhere.tzwhere()
""")

0 comments on commit 39e1cdd

Please sign in to comment.